Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354022 - constructor inlining can fail for some groovy built code
Summary: constructor inlining can fail for some groovy built code
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 12:17 EDT by Andrew Clement CLA
Modified: 2011-08-05 12:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.