-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Emit trivial leaf CFI for UnwindOp::None on arm64 #619
Conversation
With this patch, dump_syms produces the following output for libsystem_kernel.dylib from macOS 12.3.1: https://gist.github.com/mstange/8fdff669c0785ec7a4c005311e639801 |
Before:
After:
Resulting socc-pair diff: frames: [
0: {
file: null
frame: 0
function: __psynch_cvwait
function_offset: 0x00000008
line: null
missing_symbols: false
module: libsystem_kernel.dylib
module_offset: 0x00005290
offset: 0x1a2704290
trust: context
unloaded_modules: null
}
1: {
file: null
frame: 1
function: _pthread_cond_wait
function_offset: 0x000004d0
line: null
missing_symbols: false
module: libsystem_pthread.dylib
module_offset: 0x00007838
offset: 0x1a273e838
~ local had better trust (frame_pointer vs cfi)
unloaded_modules: null
}
- local had extra array value:
2: {
file: hg:hg.mozilla.org/mozilla-central:mozglue/misc/ConditionVariable_posix.cpp:8e5247451c9a83abe6f877f5f2c62332a84c9aaf
frame: 2
function: mozilla::detail::ConditionVariableImpl::wait(mozilla::detail::MutexImpl&)
function_offset: 0x0000000000000008
line: 106
missing_symbols: false
module: libmozglue.dylib
module_offset: 0x0000000000054f08
offset: 0x0000000104e94f08
trust: cfi
unloaded_modules: null
}
2: {
file: hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:8e5247451c9a83abe6f877f5f2c62332a84c9aaf
~ ignoring field frame: 2
function: nsThread::ProcessNextEvent(bool, bool*)
function_offset: 0x00000420
line: 1141
missing_symbols: false
module: XUL
module_offset: 0x003fa62c
offset: 0x11a6a262c
trust: cfi
unloaded_modules: null
} |
|
LGTM, but I would like to wait for a second opinion. |
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.
sounds reasonable. Too bad all these functions don’t have "real" CFI, and you need to apply such heuristics.
fixes #618
This needs some testing on real inputs