-
Notifications
You must be signed in to change notification settings - Fork 506
Unhandled exception handling on Unix #2157
Conversation
jkotas
commented
Nov 7, 2016
- Reduced differences between the unwind info, gc info and eh info encodings between Windows and Unix.
- Miscellaneous tweaks to get unhandled exceptions fail with gracefully with error message and abort with this change
- Reduced differences between the unwind info, gc info and eh info encodings between Windows and Unix. - Miscellaneous tweaks to get unhandled exceptions fail with gracefully with error message and abort with this change
|
@janvorli PTLA |
|
@jkotas SO nice that you are already working on this :) Stacktrace from lldb from the Segmentation Fault: |
This is problem with libunwind on Mac - it does not return pointers where registers were stored. @janvorli Do you have thoughts on the approach we want to take to fix it? |
|
@jkotas can we use the same approach we used for CoreCLR and pin the objects referred to by registers? |
janvorli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This crash is in EH, so it has nothing to do pinning. We may be able to use the same approach, but the EH needs to be fixed to be compatible with it. |
|
@jkotas ah, I've thought you meant the general approach. As for fixing this issue in EH, we could add the frame pointer value to the REGDISPLAY for OSX, set it in the UnwindCursorToRegDisplay and make the REGDISPLAY::GetFP return that. |
|
Or bite the bullet and have a local (limited) DWARF unwinder that does what we need. We can copy the one from mono. I have doubts that what we will be able to get a good perf out of the current scheme: There is too much of copying of large contexts; a lot of pinning (it is different from CoreCLR where we have this problem in the left FCall frames only); redundant unwind info lookups (once to find the LSDA, and second time to do the actual lookup), ... . |