-
Notifications
You must be signed in to change notification settings - Fork 816
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
Some unwinding problems with the new vm cstack mode on AArch 64 #819
Comments
Thank you for the report and the analysis.
I'll take a closer look when I have time. |
I've pushed the fix for both issues. Thanks again for the thorough analysis. |
For the reference, I submitted the JVM bug JDK-8323755. |
Hi Andrei
Recently I was trying out the new stack unwinding implementation (--cstack vm) and found that there may be two problems here on AArch64.
reproducer
The first problem is that the call_stub and native methods below
main
areunknown
.After discussing with D-D-H, he thought it might be because vm leaf call would reserve 2 words on the stack.
I slightly modified stackWalker.cpp.
When calculating the caller
sp
of nmethod frame, check if there is an instruction likesstp xzr, x9, [sp, #-16]!
near thepc
,and if so then deal with the
sp
accordingly. After verification, the problem can indeed be solved.However, in the picture above, there is still a small probability of stack unwinding errors (left most, details in the picture below).
This leads to the second problem.
I found that the cfa_off of gettimeofday@plt is 0, it will enter the branch
AArch64 default_frame
, resulting insp
calculation error.When executing gettimeofday@plt, since
sp
andfp
will not be modified, they are actually the same as thefp
andsp
of os::javaTimeMillis.I modified the code slightly, calculate
sp
like os::javaTimeMillis, and found that the problem could be solved.After solving the above two problems, the correct result is as follows
I don't know if you can confirm it ?
If it is indeed a problem, I wonder if you would like me to fix it. It might take me some time and there is a lot of background knowledge to understand.
The text was updated successfully, but these errors were encountered: