compiler-research / CppInterOp

A Clang-based C++ Interoperability Library
Other
38 stars 20 forks source link

Add llvm libunwind callback to suppress exceptions on apple silicon #254

Open maximusron opened 2 months ago

maximusron commented 2 months ago

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 leaked compat::Interpreter class

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 54.76%. Comparing base (114b3ff) to head (c3c8510).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254/graphs/tree.svg?width=650&height=150&src=pr&token=7UWTYSVVT5&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research)](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research) ```diff @@ Coverage Diff @@ ## main #254 +/- ## ========================================== + Coverage 54.31% 54.76% +0.45% ========================================== Files 8 8 Lines 2957 2958 +1 ========================================== + Hits 1606 1620 +14 + Misses 1351 1338 -13 ``` | [Files](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research) | Coverage Δ | | |---|---|---| | [lib/Interpreter/Compatibility.h](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?src=pr&el=tree&filepath=lib%2FInterpreter%2FCompatibility.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research#diff-bGliL0ludGVycHJldGVyL0NvbXBhdGliaWxpdHkuaA==) | `79.38% <ø> (+2.06%)` | :arrow_up: | | [lib/Interpreter/CppInterOp.cpp](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?src=pr&el=tree&filepath=lib%2FInterpreter%2FCppInterOp.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research#diff-bGliL0ludGVycHJldGVyL0NwcEludGVyT3AuY3Bw) | `50.86% <100.00%> (+0.38%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research) | [Files](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research) | Coverage Δ | | |---|---|---| | [lib/Interpreter/Compatibility.h](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?src=pr&el=tree&filepath=lib%2FInterpreter%2FCompatibility.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research#diff-bGliL0ludGVycHJldGVyL0NvbXBhdGliaWxpdHkuaA==) | `79.38% <ø> (+2.06%)` | :arrow_up: | | [lib/Interpreter/CppInterOp.cpp](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254?src=pr&el=tree&filepath=lib%2FInterpreter%2FCppInterOp.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research#diff-bGliL0ludGVycHJldGVyL0NwcEludGVyT3AuY3Bw) | `50.86% <100.00%> (+0.38%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/compiler-research/CppInterOp/pull/254/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=compiler-research)
github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

vgvassilev commented 2 months ago

@mcbarton, our cache sizes nowadays allow for having 1-2 osx-x86 builds. Are they easy to bring back?

mcbarton commented 2 months ago

@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.

vgvassilev commented 2 months ago

@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!

github-actions[bot] commented 2 months ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 1 month ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 1 month ago

clang-tidy review says "All clean, LGTM! :+1:"