Files
Louis Dionne c5a3aa8934 [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
(cherry picked from commit b3a199469c9d54fb3bdabf6dff5677b401f8fef6)
2025-10-17 12:21:27 +00:00
..