[all-commits] [llvm/llvm-project] c4779e: [libc++abi] Avoid raw calls to assert() in libc++a...

Louis Dionne via All-commits all-commits at lists.llvm.org
Thu Nov 23 15:21:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4779ea8e709a7bce7288988fabf1ba50e9c9477
      https://github.com/llvm/llvm-project/commit/c4779ea8e709a7bce7288988fabf1ba50e9c9477
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2023-11-23 (Thu, 23 Nov 2023)

  Changed paths:
    M libcxxabi/src/abort_message.h
    M libcxxabi/src/cxa_demangle.cpp
    M libcxxabi/src/demangle/DemangleConfig.h
    M libcxxabi/src/demangle/ItaniumDemangle.h
    M libcxxabi/src/demangle/Utility.h
    M libcxxabi/src/fallback_malloc.cpp
    M libcxxabi/test/test_fallback_malloc.pass.cpp
    M llvm/include/llvm/Demangle/DemangleConfig.h
    M llvm/include/llvm/Demangle/ItaniumDemangle.h
    M llvm/include/llvm/Demangle/Utility.h

  Log Message:
  -----------
  [libc++abi] Avoid raw calls to assert() in libc++abi (#71121)

The runtimes now have a principled way of doing assertions in relation
to hardening, so we should use that instead of raw calls to assert()
inside libc++abi. This patch aims to maintain the behavior of the
demangler code when it is used from within LLVM by introducing a simple
DEMANGLE_ASSERT(...) macro that is then defined to the appropriate
assertion mechanism.




More information about the All-commits mailing list