Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366976 - [compiler] Fup of Bug 366597: StackOverflow w/ RoleModel.implementMethodBindingsFromSuperinterfaces
Summary: [compiler] Fup of Bug 366597: StackOverflow w/ RoleModel.implementMethodBindi...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.0.1   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 2.1 M7   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 374778 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-16 15:21 EST by Stephan Herrmann CLA
Modified: 2013-02-20 16:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-12-16 15:21:29 EST
Using a similar buggy source as in bug 366597 a stack overflow can be
observed:

package t;

import base b.Base;

/**
 * @author stephan
 *
 */
public team class T1 {
//	protected abstract class IR {
//		abstract org.Missing foo();
//	}
	protected interface IR
	protected class R implements IR playedBy Base {
	}
}

causes this pattern of repetition:
	at org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel.implementMethodBindingsFromSuperinterfaces(RoleModel.java:1335)
	at org.eclipse.objectteams.otdt.internal.core.compiler.model.ModelElement.evaluateLateAttributes(ModelElement.java:139)
	at org.eclipse.objectteams.otdt.internal.core.compiler.model.TypeModel.evaluateLateAttributes(TypeModel.java:442)
	at org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel.evaluateLateAttributes(RoleModel.java:1352)
	at org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies.ensureRoleState(Dependencies.java:788)
	at org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies.ensureBindingState(Dependencies.java:480)
	at org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel.implementMethodBindingsFromSuperinterfaces(RoleModel.java:1335)
...

Unfortunately I can't see the original trigger in the trace.
Comment 1 Stephan Herrmann CLA 2012-04-07 11:51:14 EDT
Fix for 2.1M7 via commit bbc91e3a29dade6d40312af8003b2df4f620699f.

The issue could be reproduced by requesting the super type hierarchy for T1.IR.
We now use StateMemento._currentlyProcessingState to detect re-entrant requests for STATE_LATE_ATTRIBUTES_EVALUATED.
Comment 2 Stephan Herrmann CLA 2012-04-07 19:56:23 EDT
*** Bug 374778 has been marked as a duplicate of this bug. ***
Comment 3 Stephan Herrmann CLA 2013-02-20 16:22:19 EST
Verified using 2.2 M5