-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add llvm libunwind callback to suppress exceptions on apple silicon #254
base: main
Are you sure you want to change the base?
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #254 +/- ##
=======================================
Coverage 72.69% 72.70%
=======================================
Files 8 8
Lines 2963 2964 +1
=======================================
+ Hits 2154 2155 +1
Misses 809 809
|
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.
clang-tidy made some suggestions
lib/Interpreter/Compatibility.h
Outdated
#include "llvm/Support/Casting.h" | ||
#include "llvm/Support/Path.h" | ||
|
||
/home/maximus/cppyy-interop-dev/CppInterOp/llvm-project/compiler-rt/lib/orc/macho_platform.cpp |
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.
warning: expected unqualified-id [clang-diagnostic-error]
/home/maximus/cppyy-interop-dev/CppInterOp/llvm-project/compiler-rt/lib/orc/macho_platform.cpp
^
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
a7ae7ef
to
be0085b
Compare
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
@mcbarton, our cache sizes nowadays allow for having 1-2 osx-x86 builds. Are they easy to bring back? |
@vgvassilev Yes, they are easy to bring back. I'll put in a PR which brings them back. |
Nice! Thanks for the speed-of-light reply and PR! |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
c3c8510
to
3a6db23
Compare
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.
clang-tidy made some suggestions
dlsym(RTLD_DEFAULT, "__unw_remove_find_dynamic_unwind_sections")) | ||
unw_remove_find_dynamic_unwind_sections(find_dynamic_unwind_sections); | ||
#endif | ||
sInterpreter.release(); |
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.
warning: the value returned by this function should be used [bugprone-unused-return-value]
sInterpreter.release();
^
Additional context
lib/Interpreter/CppInterOp.cpp:109: cast the expression to void to silence this warning
sInterpreter.release();
^
Adding fix from
This adds the
find_dynamic_unwind_sections
callback, used by libunwind to fix thelibc++abi: terminating due to uncaught exception of type int
on apple silicon. This returns fake_mach_header as the header for all JIT'd code.The checks are performed during library loading and unloading time, and so have been added during interpreter creation and destruction called in
CppInterOp.cpp
, via the leakedcompat::Interpreter
class