-
Notifications
You must be signed in to change notification settings - Fork 738
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
Test-sanity.functional-JDK11-win_x86-64_cmprssptrs StringPeepholeTest_0 NPE #2955
Comments
@JasonFengJ9 for triage please. |
Given the test options, its likely jit |
It is JIT.
|
@cathyzhyi - Can we look at this with urgency, it's holding the 0.10.0 delivery. Would you please assess the mustfix nature... Thanks! |
actually I think @liqunl is the best person to have a quick look here |
I got a crash in compiled method |
Thanks @andrewcraik and @liqunl |
The crash is not reproducible on java9 and jdk10, it only happens on jdk11. The crash is an Illegal instruction
In trace log
In the core dump
The first 4 bytes have been patched to The snippet is generated for
I suspect the call to populateVPicVTableDispatch changed the return address to |
Yes, this is caused by an unresolved private call. My code is supposed to set the return address so that we return to the jump shown at 0x7ffeb9219e0. But I thought that there would be 7 bytes of space for the call, not 8, so PicBuilder "should" have set the return address to 0x7ffeb9219df instead. From Liqun's comment, the bytes there are 00 e9 5b f2 ff, which disassemble like this:
Returning there will result in an illegal instruction at 0x7ffeb9219e2, which is exactly what Liqun found. It turns out that the length of the call instruction we would use for normal virtual dispatch is either 7 or 8, depending on the value of its ModR/M byte. PicBuilder will need to inspect the ModR/M byte in order to determine the correct return address, and also when patching over the call. On 32-bit, PicBuilder already knows the correct length of 6, which thankfully is fixed. |
@liqunl , @jdmpapin @andrewcraik - do we have an ETA for this? |
I have what I believe should be a fix, and I'm trying to reproduce the 8-byte call so that I can verify the behaviour in that case. With a bit of luck I hope to be done that today |
When x86 PicBuilder is carrying out a direct call to a private method of a nestmate, it sets the return address so that the call will return into the code in the VPIC snippet, which in the case of a virtual dispatch would be something like the following: call qword ptr [$vftReg+$vftOffset] jmp mainline In particular, the callee should return to the jmp instruction, whose address has been calculated as 7 + the address of the call instruction. But the call is sometimes one byte longer. The variability is now dealt with as follows: - When overwriting the call, PicBuilder now writes a value that works for both 7- and 8-byte offsets to the jmp instruction. - When doing direct dispatch for nestmates, PicBuilder now detects the offset to jmp, in order to compute the correct return address. Fixes eclipse-openj9#2955 Signed-off-by: Devin Papineau <devinmp@ca.ibm.com>
I've opened #3005 with the fix |
https://ci.eclipse.org/openj9/job/Test-sanity.functional-JDK11-win_x86-64_cmprssptrs/19/tapResults/
This isn't the first occurrence of the failure.
The text was updated successfully, but these errors were encountered: