-
Notifications
You must be signed in to change notification settings - Fork 767
Restore MemberName on stack for linkTo* methods after PopFrame #19744
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
Conversation
This needs to be tested with the target frame compiled - I suspect the decompilation case will already have the stack in the correct format, leading the this code pushing extraneous data. |
You indicate in the RTC PR that this is tested with JIT , but I don't see why the decomp case would not have fully filled in the stack, so the extra work here would be unnecessary. Please elaborate. |
I found that the decompilation case also needs the fix based on testing and introspection ... I tried the below testcase with Test Case
JDB Instructions
|
0d0719e
to
f1acc1c
Compare
This seems like the right approach for the interpreter, but I still maintain the JIT case should take care of itself (there may be errors in the OSR framework for this case, or the decompiler itself). Please run with |
I don't recall ever updating the decompiler to handle the polymorphic signature calls (the decompiler decides what the pending stack should look like, and assumes the OSR code will agree). |
Verbose stack walk output: verbose_stackwalk.log. There was a lot of output. I filtered it for the following thread:
@gacholio Does the attached verbose output confirm that the JIT decompiled won't take care of itself? I also noticed a crash with Lines 225 to 236 in 293f2b7
Native stack during the crash:
|
A segfault was observed with -verbose:stackwalk=0 in eclipse-openj9#19744 where walkState->userData4 was NULL. Signed-off-by: Babneet Singh <[email protected]>
A segfault was observed with -verbose:stackwalk=0 in eclipse-openj9#19744 where walkState->userData4 was NULL. Signed-off-by: Babneet Singh <[email protected]>
A segfault was observed with -verbose:stackwalk=0 in eclipse-openj9#19744 where walkState->userData4 was NULL. Signed-off-by: Babneet Singh <[email protected]>
A segfault was observed with -verbose:stackwalk=0 in eclipse-openj9#19744 where walkState->userData4 was NULL. Signed-off-by: Babneet Singh <[email protected]>
OJDK MH INLs: linkToStaticSpecial, linkToVirtual and linkToInterface pop the top element from the stack before executing the target method. The top element is an instance of MemberName. These native INLs don't show up on the stack, and when we pop a frame, we drop to the frame which exists before these INLs. A crash happens if the element popped by the OJDK MH INLs is not restored after a frame is popped. To prevent the crash, the removed element is restored after a frame is popped. RTC Issue 151332 Signed-off-by: Babneet Singh <[email protected]>
jenkins test sanity,extended alinux jdk21 |
OJDK MH INLs:
linkToStaticSpecial
,linkToVirtual
andlinkToInterface
pop the top element from the stack before executing the target method.
The top element is an instance of
MemberName
. These native INLs don'tshow up on the stack, and when we pop a frame, we drop to the frame
which exists before these INLs. A crash happens if the element popped
by the OJDK MH INLs is not restored after a frame is popped. To
prevent the crash, the removed element is restored after a frame is
popped.
RTC Issue 151332