-
Notifications
You must be signed in to change notification settings - Fork 45
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
hotswap crashes JVM (bad stackmap) #227
Comments
Using the I'm also not finding any notable differences between the The code in the JDK which results in the crash:
If I comment out line 32, there is no crash:
In the code block above, the values are:
Will have to understand what exactly the JVM code is reading, to know what to check in Eclipse code... |
I tried the following sequence in
I have experimented with adding output, the redefine is done successfully. Eclipse redefines all the classes (outer and inner), but I tried modifying the code to only redefine the actually changed inner class, the crash still occurs in Eclipse. The redefine is done with the bytes from the I'm not sure that the compiler is doing something bad here. If it is, its hard to follow what the Eclipse debugger is doing to run into the crash. The crash occurs when this code is executed, after the
This is when the With this change in JDT debug code, there is no crash:
The code that Eclipse is invoking is: https://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/com/sun/jdi/StackFrame.html#thisObject() I don't know how to simulate a call like this with Same crash occurs if I hold the debugger at Do we have a JDK bug here? |
Moved to JDT debug, I didn't see anything that indicates a compiler bug - other than so far not being able to reproduce with |
I can reproduce this also in IntelliJ, using slightly adjusted snippet. I'll report this to OpenJDK maintainers. hs_err_pid7064_intellij.log Steps in IntelliJ:
hs_err_pid8664_eclipse.log Steps with Eclipse:
Adjusted snippet:
|
https://bugs.openjdk.org/browse/JDK-8307331 was opened. Since it was determined that the bug is in the JVM, I'll close this issue. If later on it turns out Eclipse needs to do more, I'll re-open. |
A PR was opened: openjdk/jdk#13795 |
Fixed with OpenJDK 17.0.8. |
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=565537
To reproduce, debug the snippet below with breakpoint at the only
println()
(line 23). Then change the string in the line above from"ab"
to"abc"
and save the file.Crash: hs_err_pid148440.log
The text was updated successfully, but these errors were encountered: