Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354022

Summary: constructor inlining can fail for some groovy built code
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: LTWeavingAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.6.12   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Clement CLA 2011-08-05 12:17:24 EDT
The file grails.util.BuildSettings contains bytecode where the constructors are recursive.

You can't compile this in Java

A() {
  this();
}

but groovy generates some code where it switches on a value in the ctor and if it is a certain value, the recursive ctor call is made.  I imagine this 'never happens' in practice but because it is in the bytecode it trips up the AspectJ code which inlines this() calls before weaving - since it gets into an infinite loop.

For now, just keep track of ctors making the recursive call and so don't get trapped in the infinite loop.
Comment 1 Andrew Clement CLA 2011-08-05 12:27:39 EDT
fixes in. Seems to behave, perhaps not perfect but we'll limp along.