Commit b5cbb354 authored by Ilya Biryukov's avatar Ilya Biryukov Committed by Tobias Hieta
Browse files

[libc++] Use correct size for deallocation of arrays in shared_ptr (#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 f722db02)
parent e6de86cb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment