-
Notifications
You must be signed in to change notification settings - Fork 26
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 70.62% 70.64% +0.01%
==========================================
Files 9 9
Lines 3500 3502 +2
==========================================
+ Hits 2472 2474 +2
Misses 1028 1028
|
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
lib/Interpreter/CppInterOp.cpp
Outdated
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();
^
This PR is stale because it has been open for 90 days with no activity. |
3a6db23
to
e20f5df
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
@@ -72,9 +72,11 @@ static inline char* GetEnv(const char* Var_Name) { | |||
#include "llvm/ADT/SmallString.h" | |||
#include "llvm/ADT/StringRef.h" | |||
#include "llvm/ADT/Twine.h" | |||
#include "llvm/BinaryFormat/MachO.h" | |||
#include "llvm/Config/llvm-config.h" |
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: included header MachO.h is not used directly [misc-include-cleaner]
#include "llvm/Config/llvm-config.h" | |
#include "llvm/Config/llvm-config.h" |
#include "llvm/Config/llvm-config.h" | ||
#include "llvm/ExecutionEngine/JITSymbol.h" | ||
#include "llvm/ExecutionEngine/Orc/LLJIT.h" | ||
#include "llvm/Object/MachO.h" | ||
#include "llvm/Support/Casting.h" |
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: included header MachO.h is not used directly [misc-include-cleaner]
#include "llvm/Support/Casting.h" | |
#include "llvm/Support/Casting.h" |
d192285
to
02ca483
Compare
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