[all-commits] [llvm/llvm-project] 374fff: Fix out-of-bounds access to std::unique_ptr<T[]> (...

Alexander Kornienko via All-commits all-commits at lists.llvm.org
Wed Oct 9 05:15:28 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 374fffe015b48676fb3785167d363454a2f4dd1f
      https://github.com/llvm/llvm-project/commit/374fffe015b48676fb3785167d363454a2f4dd1f
  Author: Alexander Kornienko <alexfh at google.com>
  Date:   2024-10-09 (Wed, 09 Oct 2024)

  Changed paths:
    M clang/lib/Frontend/TextDiagnostic.cpp
    A clang/test/Frontend/highlight-text.c

  Log Message:
  -----------
  Fix out-of-bounds access to std::unique_ptr<T[]> (#111581)

This manifested as an assertion failure in Clang built against libc++
with
hardening enabled (e.g.
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG):
`libcxx/include/__memory/unique_ptr.h:596: assertion
__checker_.__in_bounds(std::__to_address(__ptr_), __i) failed:
unique_ptr<T[]>::operator[](index): index out of range`



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