[all-commits] [llvm/llvm-project] 45a09d: [libc++] Add an ABI setting to harden unique_ptr<T...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Sep 27 05:49:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 45a09d1811d5d6597385ef02ecf2d4b7320c37c5
      https://github.com/llvm/llvm-project/commit/45a09d1811d5d6597385ef02ecf2d4b7320c37c5
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

  Changed paths:
    M libcxx/cmake/caches/Generic-hardening-mode-fast-with-abi-breaks.cmake
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__configuration/abi.h
    A libcxx/include/__memory/array_cookie.h
    M libcxx/include/__memory/unique_ptr.h
    M libcxx/include/module.modulemap
    M libcxx/test/libcxx/containers/associative/unord.map/abi.compile.pass.cpp
    M libcxx/test/libcxx/containers/associative/unord.set/abi.compile.pass.cpp
    A libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/incomplete.sh.cpp
    A libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp
    M libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/get.pass.cpp
    M libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/op_subscript.runtime.pass.cpp
    M libcxx/utils/libcxx/test/features.py

  Log Message:
  -----------
  [libc++] Add an ABI setting to harden unique_ptr<T[]>::operator[] (#91798)

This allows catching OOB accesses inside `unique_ptr<T[]>` when the size
of the allocation is known. The size of the allocation can be known when
the unique_ptr has been created with make_unique & friends or when the
type necessitates an array cookie before the allocation.



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