Skip to content
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

Workaround Clang 14 ASAN false positive on throwing exceptions #168

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

Flamefire
Copy link
Collaborator

@Flamefire Flamefire commented Jun 5, 2022

Fix the AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) false positive reported by recent Clang with libc++ by reverting to Clang 13.
Fixes #167

Contains a reproducer for the issue (only first commit in an extra branch): https://github.com/boostorg/boost-ci/runs/6746407072?check_suite_focus=true

In other repos Clang 14 with libc++ reports an ASAN failure:
> AddressSanitizer: alloc-dealloc-mismatch

- `free` in std::range_error::~range_error() (/lib/x86_64-linux-gnu/libc++abi.so.1...)
- Allocated by `new` in std::runtime_error::runtime_error(std::__1::basic_string<...> const&) (/lib/x86_64-linux-gnu/libc++.so.1...)
Fix the `AddressSanitizer: alloc-dealloc-mismatch (operator new vs free)` false positive reported by recent Clang with libc++ by reverting to Clang 13.
Fixes boostorg#167
@Flamefire Flamefire marked this pull request as ready for review June 5, 2022 18:23
@codecov
Copy link

codecov bot commented Jun 5, 2022

Codecov Report

Merging #168 (23c7493) into master (699bb3b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #168   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           16        20    +4     
  Branches         7        10    +3     
=========================================
+ Hits            16        20    +4     
Impacted Files Coverage Δ
include/boost/boost-ci/boost_ci.hpp 100.00% <100.00%> (ø)
test/test.cpp 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 699bb3b...23c7493. Read the comment docs.

A false positiv starting with Clang 13 prevents us from upgrading.
@Flamefire Flamefire marked this pull request as draft June 6, 2022 08:09
@Flamefire Flamefire marked this pull request as ready for review June 6, 2022 13:58
@Flamefire Flamefire merged commit 376479c into boostorg:master Jun 6, 2022
@Flamefire Flamefire deleted the clang_asan_fix branch June 6, 2022 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clang ASAN failure with Clang 14 + libc++
1 participant