[all-commits] [llvm/llvm-project] ac191b: [compiler-rt][test] Add REQUIRES for checking stat...

PiJoules via All-commits all-commits at lists.llvm.org
Wed Sep 22 15:26:49 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac191bcc99e2fc4ab7993138f5e82a0b75b7e9db
      https://github.com/llvm/llvm-project/commit/ac191bcc99e2fc4ab7993138f5e82a0b75b7e9db
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M compiler-rt/CMakeLists.txt
    M compiler-rt/test/asan/TestCases/intercept-rethrow-exception.cpp
    M compiler-rt/test/lit.common.cfg.py
    M compiler-rt/test/lit.common.configured.in

  Log Message:
  -----------
  [compiler-rt][test] Add REQUIRES for checking static libc++abi

intercept-rethrow-exception.cc fails when running runtimes tests if linking in
a hermetic libc++abi. This is because if libc++abi is used, then asan expects
to intercept __cxa_rethrow_primary_exception on linux, which should unpoison the
stack. If we statically link in libc++abi though, it will contain a strong
definition for __cxa_rethrow_primary_exception which wins over the weakly
defined interceptor provided by asan, causing the test to fail by not unpoisoning
the stack on the exception being thrown.

It's likely no one has encountered this before and possible that upstream tests
opt for dynamically linking where the interceptor can work properly. An ideal
long term solution would be to update the interceptor and libc++[abi] APIs to
work for this case, but that will likely take a long time to work out. In the
meantime, since the test isn't necessarily broken, we can just add another
REQUIRES check to make sure that it's only run if we aren't statically linking
in libc++abi.

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




More information about the All-commits mailing list