[all-commits] [llvm/llvm-project] db7c82: Restore global descriptor demangling after D138095...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Nov 21 12:52:06 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db7c82231c32074440d5426870051228435c6bce
      https://github.com/llvm/llvm-project/commit/db7c82231c32074440d5426870051228435c6bce
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M compiler-rt/lib/asan/asan_globals.cpp
    M compiler-rt/test/asan/TestCases/Linux/odr_indicators.cpp
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    M llvm/test/Instrumentation/AddressSanitizer/local_alias.ll

  Log Message:
  -----------
  Restore global descriptor demangling after D138095 "[asan] Keep Itanium mangled names in global metadata"

This amends commit 00be3578e0841dd9abe408e5b4946180de0bf46b to demangle symbol
names in global descriptors. We keep the mangled name for the `__odr_gen_asan_*`
variables and the runtime __cxa_demangle call site change (which fixed possible
leaks for other scenarios: non-fatal diagnostics).

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp uses
an undefined weak `__cxa_demangle` which does not pull in an archive definition.
A -static-libstdc++ executable link does not get demangled names.

Unfortunately this means we cannot rely on runtime demangling.
See compiler-rt/test/asan/TestCases/global-demangle.cpp




More information about the All-commits mailing list