You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The allocation divides by sizeof(_AlignedStorage), but the deallocation does not appear to make the same adjustment. That may be the source of the issue, which could be fixed w/ something like:
Fixesllvm#68051.
Current implementation passes the number of `_AlignedStorage` objects
when it calls to `allocate` and the number of **bytes** on deallocate.
This only applies to allocations that allocate control block and the
storage together, i.e. `make_shared` and `allocate_shared`.
Found by ASan.
…68233)
Fixes#68051.
Current implementation passes the number of `_AlignedStorage` objects
when it calls to `allocate` and the number of **bytes** on `deallocate`.
This only applies to allocations that allocate control block and the
storage together, i.e. `make_shared` and `allocate_shared`.
Found by ASan under Clang combined with `-fsized-deallocation`.
(cherry picked from commit f722db0)
The following snippet yields a new/delete type mismatch when building with sized deallocation:
It runs fine with
-stdlib=libc++ -fsanitize=address -std=c++20
, but fails when adding-fsized-deallocation
. Asan stack trace:Live snippet: https://godbolt.org/z/ddYr6TYb1
Note: the mismatch was found by running the
std::boyer_moore_searcher
example snippet on cppreference: https://godbolt.org/z/Gsx6dWPYn. Likely it has the same underlying issue, although this one does not require c++20 to reproduce.The allocation divides by
sizeof(_AlignedStorage)
, but the deallocation does not appear to make the same adjustment. That may be the source of the issue, which could be fixed w/ something like:The text was updated successfully, but these errors were encountered: