[all-commits] [llvm/llvm-project] 00a100: sanitizer_common/symbolizer: fix crashes during exit

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Mon May 17 23:58:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00a1007545ba8ad2105876a41364b35235749e2a
      https://github.com/llvm/llvm-project/commit/00a1007545ba8ad2105876a41364b35235749e2a
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-05-18 (Tue, 18 May 2021)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp
    A compiler-rt/test/tsan/atexit4.cpp

  Log Message:
  -----------
  sanitizer_common/symbolizer: fix crashes during exit

Override __cxa_atexit and ignore callbacks.
This prevents crashes in a configuration when the symbolizer
is built into sanitizer runtime and consequently into the test process.
LLVM libraries have some global objects destroyed during exit,
so if the test process triggers any bugs after that, the symbolizer crashes.
An example stack trace of such crash:

For the standalone llvm-symbolizer this does not hurt,
we just don't destroy few global objects on exit.

Reviewed By: kda

Differential Revision: https://reviews.llvm.org/D102470




More information about the All-commits mailing list