Summary: | Inconsistant stack height | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Robert Wenner <robert.wenner> |
Component: | Compiler | Assignee: | Erik Hilsdale <eh-ajdev> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P1 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Robert Wenner
2003-01-16 15:18:00 EST
This looks like a bug in the implementation of around advice inlining (available for the first time in this release). You should try compiling with -XnoInline to see if this works-around the bug. As Jim Hugunin suggested the problem does not occur if I use -xnoInline Erik, can you please move this to a P1 or P2 major bug to make sure we don't miss it for 1.1final? Now that it's assigned to you I can't make that kind of change. This is now fixed in the current tree with a test in bugs/StackError.java. The problem is that the body of the around method was being inlined into a location where the stack height was not zero. This had a bad interaction with the exception handler in the around advice that will remove everything on the stack and replace it with the exception that was raised. The simple fix was to switch to using the closure style of around advice whenever the around body has an exception handler and the join point is in stack (rather than frame) context. A much better fix would be to add one more level of indirection by putting the around advice in a method to avoid these stack issues. This will require significant bytecode work and since it is just a performance optimization, it is unlikely to happen until after 1.1.0. Erik, please take a look at these fixes and if you're happy with them, mark the bug as fixed. the fix is conservative and correct, exactly right for this stage of development. |