[all-commits] [llvm/llvm-project] 109539: [libc++][NFC] Work around false positive ODR viola...

Konstantin Varlamov via All-commits all-commits at lists.llvm.org
Fri Feb 11 11:57:09 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 10953974ed6b61247fd4b070b3a6e390e02d0edb
      https://github.com/llvm/llvm-project/commit/10953974ed6b61247fd4b070b3a6e390e02d0edb
  Author: Konstantin Varlamov <varconst at apple.com>
  Date:   2022-02-11 (Fri, 11 Feb 2022)

  Changed paths:
    M libcxx/cmake/caches/Generic-asan.cmake

  Log Message:
  -----------
  [libc++][NFC] Work around false positive ODR violations from ASan.

This works around a known issue in ASan. ASan doesn't instrument weak
symbols. Because instrumentation increases object size, the binary can
end up with two versions of the same object, one instrumented and one
not instrumented, with different sizes, which ASan will report as an ODR
violation. In libc++, this affects typeinfo for `std::bad_function_call`
which is emitted as a weak symbol in the test executable and as a strong
symbol in the shared library.

The main open issue for ASan appears to be
https://github.com/google/sanitizers/issues/1017.

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




More information about the All-commits mailing list