-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
wip correct unwinding for JIT frames #14799
Conversation
Ref #12380 ... I guess I finally understand what that PR was for after going through these ourselves. It looks like ORCJIT might not have the problem with 32bit offset? (although the function we tested with was also very small). There also seems to be another (local only) mechanism that support larger offset. |
Maybe add some comments on what the code does? |
@yuyichao oh man. I knew I saw this somewhere. arg. Well all this time we spent reading libunwind source was somewhat instructive anyway. I'll see if we can use the "nice" local version today to avoid parsing the sections ourselves. @maleadt yup at least before merging. This is just clerical work because the feature of libunwind we use to register new unwinding info dynamically for JIT code was not meant to register whole ELF objects at once so we have to do a little manual work (split the relevant section into pieces). |
I don't think the local format allows larger offsets though since as I remember it it just fills the same table of (int32,int32) in the end. As for the ugly code, it may make sense to just patch libunwind anyway to have a proper |
(or just write an unwinder in julia =)) |
Keno probably has a repo for that somewhere |
IIRC all the functions that contains section names are called on a file so probably not without patching.
You are right, I thought the list is stored in a slightly different format (since I remember there's no pointer cast). Turns out they just use
Seems that libunwind also only look for
Unfortunately not really when we are in signal context. |
770d947
to
68f3814
Compare
[ci skip]
68f3814
to
cc660f8
Compare
let's use #12380 instead, it's cleaner and together with the libunwind patch handles the 32 bit overflow condition Keno found with mcjit. |
Agree. I've just been using this patch since it's easier to rebase and test =P. |
No description provided.