[all-commits] [llvm/llvm-project] b3a199: [libc++] Properly implement array cookies in the A...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Thu Oct 16 20:41:20 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b3a199469c9d54fb3bdabf6dff5677b401f8fef6
https://github.com/llvm/llvm-project/commit/b3a199469c9d54fb3bdabf6dff5677b401f8fef6
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2025-10-16 (Thu, 16 Oct 2025)
Changed paths:
M libcxx/include/__configuration/abi.h
M libcxx/include/__memory/array_cookie.h
M libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp
Log Message:
-----------
[libc++] Properly implement array cookies in the ARM ABI (#160182)
When we implemented array cookie support for hardening std::unique_ptr,
the implementation was only done for the Itanium ABI. I did not
initially realize that ARM was using a different ABI for array cookies,
so unique_ptr should not have been hardened on ARM.
However, we were also incorrectly setting the ABI-detection macro: we
were pretending to be using a vanilla Itanium ABI when in reality the
(similar but different) ARM ABI was in use. As a result, unique_ptr was
using the wrong representation for array cookies on ARM, which
fortunately only mattered in the case of overaligned types.
This patch fixes that.
rdar://160852193
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list