-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenJ9 Crashes on ECJ-Compiled Class File #21417
Comments
It is an assertion failure in JIT.
|
FYI @hzongaro |
Perhaps the significant difference in the bytecode is in the catch block.
The compiler built into the eclipse IDE does essentially the same thing.
Both approaches seem entirely reasonable to me. |
Thanks, @keithc-ca! Yes, it does seem that that’s the source of the problem.
|
@a7ehuo, may I ask you to take a look at this problem? |
For a bit of context, the store of null to VP can generate a similar store when it does a throw-to-goto transformation since eclipse-omr/omr#392. The previous way of transforming throw to goto relied on the presence of an (Aside: From digging in ancient history, IL gen creates a temp because at one point there was a bug that allowed I suppose my point is that I think it makes sense if possible to treat such stores as valid rather than to try to get rid of them, in case the latter was being considered. |
@jdmpapin Thank you very much for the clarification! (1)
Could you elaborate more on this and why should it be changed this way here? Do you mean getting rid of temp
(2) |
Thanks 👍
First please note that this was an aside. It's not a suggestion for how to deal with this issue. It's just a tangentially related thought. Anyway, it would simplify the logic, avoid unnecessary temps, get rid of the inconsistency between I think it will be most obvious if you think about the overall effect of what IL gen does at the start of the handler before it starts walking its bytecode. Right now there are two cases. If the first bytecode instruction is
and the |
Thanks for taking the time to clarify my questions @jdmpapin! Now I understand the proposed suggestion in ILGen is to have the consistence of clearing ExceptionMeta regardless of if the first byte code is For example, if the first bytecode is
If the first bytecode is
|
Right. I've just made a small edit to your comment to show the commoning in the last trees snippet (Well, I had. It seems you've undone my edit. But in the last snippet, the second occurrence of |
Whoops, sorry, I thought I copy/pasted the commoning "by mistake" in my original post 😅. Just added it back |
After looking at the code around the fatal assert, I think openj9/runtime/compiler/optimizer/IdiomRecognition.cpp Lines 1536 to 1546 in 5d15127
TR_ASSERT_FATAL_WITH_NODE(
trNode,
trNode->getSymbol()->isStatic() || trNode->getSymbol()->isMethodMetaData(),
"direct store to non-auto, non-static, non-MethodMetaData"); |
Interesting. Is IR considering transforming a loop that contains an exception handler? |
Java -version output
Output from
java -version
.Summary of problem
Hi, we have identified a test program that causes OpenJ9 to crash.
Below is the source code of the test program:
When this program is compiled by
javac
, OpenJ9 runs the generated class file without any issues. However, when compiled usingecj
, running the generated class file on OpenJ9 triggers a crash, while HotSpot runs it successfully without any problem. This issue is reproducible on OpenJDK 11, 17, and 21 but does not occur on OpenJDK 8, where the program executes normally.Steps to Reproduce
The following commands were used to compile and execute the test program:
All ECJ-compiled test programs crash when executed using OpenJ9. We have uploaded the test program along with the necessary dependencies, which can be downloaded from CrashWithEcj.zip.
Would appreciate your insights into this issue. Thanks!
Note that, this issue is only reproducible on Ubuntu. On macOS, OpenJ9 does not crash.
Software and Hardware Environment:
Diagnostic files
The core dump file can be found in the attachment.
The text was updated successfully, but these errors were encountered: