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
[x86/Linux] JIT.Directed.coverage.oldtests.ovfldiv1_il_r Test Failure #7336
Comments
It seems that there is some calling convention mismatch:
|
I figured out why segfault happens. Here is the JIT disasm of
After executing fault code, CLR resumes execution from
When the execution reaches |
@jkotas @dotnet/jit-contrib Could you let me know your opinion on which approach will be better to resolve this issue? I currently consider two approaches:
|
\CC @seanshpark @wateret |
It would need to be used everywhere as the managed calling convention, not just for this one helper. Do you agree? Given that, adjusting ESP before resume execution sounds better to me. |
@jkotas Is it possible to contorl calling convention on JIT Helpers? If not, I definitely agree with you. We should take the latter approach. If possible, we need to consider the former approach, too (IMO). For the latter one, I would like to know whether it is possible to get the number for stack elements of JIT Helpers from EE side. As I know, it is possible for managed methods, but I'm not sure about JIT Helpers. |
The JIT and VM assumes the one managed calling convention for everything: JIT helpers, FCalls, regular JITed managed methods. There is no way to control it.
You should be able to get it from the last column of https://github.com/dotnet/coreclr/blob/master/src/inc/jithelpers.h#L31. (I do not think that the last column is compiled in today - you would need to compile it in.) But I am still wondering - is it really the case that the libunwind unwinder does not take care of this? |
As I understand, libunwind-based unwinder takes care of this ( I'm not sure about libunwind itself. The execution trace implies that libunwind restores virtual registers as the state before call (not after call). |
@jkotas It turns out that libunwind does not take care of calling convention. I tested the following program:
When the execution of
|
Ok. We will need to compute the number of stack elements to pop as you have proposed. |
Close as this issue disappears. |
JIT.Directed.coverage.oldtests.ovfldiv1_il_r
test ends with segmentation fault:The text was updated successfully, but these errors were encountered: