Fix #141: macOS ARM doesn't support leak sanitizer#151
Conversation
LeakSanitizer is unsupported on macOS (clang rejects -fsanitize=leak on arm64-apple-darwin and other Apple targets); leak detection there is provided by AddressSanitizer with ASAN_OPTIONS=detect_leaks=1. When myproject_ENABLE_SANITIZER_LEAK is requested on an Apple host, myproject_enable_sanitizers now warns and drops it from the sanitizer list instead of producing an unsupported -fsanitize=leak compile flag. Adds two CMake-script regression tests that stub target_*_options to verify leak is filtered out on Apple and still propagated elsewhere.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #151 +/- ##
=======================================
Coverage 20.50% 20.50%
=======================================
Files 5 5
Lines 239 239
Branches 111 111
=======================================
Hits 49 49
+ Misses 186 179 -7
- Partials 4 11 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@leftibot investigate build failures |
|
Hi @lefticus — I tried to address the review feedback but couldn't produce a working change. May need human attention. |
|
@leftibot can you determine why the wasm builds are failing by looking at the GitHub build logs? |
|
Looked at the failing Root causeThe link step for We are passing both flags from
The combination has always been documented as fragile (see the warning), but the pipeline now hard-errors instead of producing a half-broken binary. The trigger is almost certainly an emscripten upgrade: Suggested fixes (any one unblocks CI)
Recommendation: open a separate issue for this — it's orthogonal to the leak-sanitizer-on-Apple work in this PR, and merging this PR shouldn't be blocked by it. Short term, pinning emsdk gets CI green; medium term, option (2)/(3) is the durable fix. I have not attempted any of these changes from this PR's branch, since they don't belong here. |
Automated fix by @leftibot.
What changed
Files
Closes #141
Triggered by @lefticus.