[PATCH] D63877: Avoid infinite loop with asan interception

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 06:52:39 PDT 2019


uweigand added subscribers: hans, uweigand.
uweigand added a comment.

Just a quick heads-up: the new test case is failing on SystemZ.  I'm not quite sure why, but the build bots show this error:

  /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/projects/compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c:5:11: error: CHECK: expected string not found in input
  // CHECK: AddressSanitizer: failed to intercept '__cxa_throw'
            ^
  <stdin>:1:1: note: scanning from here
  ==8377==AddressSanitizer: failed to intercept '__isoc99_printf'
  ^
  <stdin>:10:10: note: possible intended match here
  '==8377==AddressSanitizer: failed to intercept '__cxa_rethrow_primary_exception'
           ^

Running the test case manually, I see this output:

  000000000007f990 T __interceptor_dlopen
  [uweigand at s83lp56 llvm-head]$ ASAN_OPTIONS=verbosity=1 LD_LIBRARY_PATH=/home/uweigand/llvm/build/llvm-head/lib64/clang/10.0.0/lib/linux /home/uweigand/llvm/build/llvm-head/projects/compiler-rt/test/asan/S390XLinuxDynamicConfig/TestCases/Linux/Output/dlopen-mixed-c-cxx.c.tmp.out /home/uweigand/llvm/build/llvm-head/projects/compiler-rt/test/asan/S390XLinuxDynamicConfig/TestCases/Linux/Output/dlopen-mixed-c-cxx.c.tmp.so 
  ==138401==AddressSanitizer: failed to intercept '__isoc99_printf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_sprintf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_snprintf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_fprintf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_vprintf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
  '==138401==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
  '==138401==AddressSanitizer: failed to intercept 'xdr_quad_t'
  '==138401==AddressSanitizer: failed to intercept 'xdr_u_quad_t'
  '==138401==AddressSanitizer: failed to intercept 'dlopen'
  '==138401==AddressSanitizer: failed to intercept '__cxa_rethrow_primary_exception'
  '==138401==AddressSanitizer: libc interceptors initialized
  || `[0x14000000000000, 0x1fffffffffffff]` || HighMem    ||
  || `[0x12800000000000, 0x13ffffffffffff]` || HighShadow ||
  || `[0x12000000000000, 0x127fffffffffff]` || ShadowGap  ||
  || `[0x10000000000000, 0x11ffffffffffff]` || LowShadow  ||
  || `[0x000000000000, 0xfffffffffffff]` || LowMem     ||
  MemToShadow(shadow): 0x12000000000000 0x123fffffffffff 0x12500000000000 0x127fffffffffff
  redzone=16
  max_redzone=2048
  quarantine_size_mb=256M
  thread_local_quarantine_size_kb=1024K
  malloc_context_size=30
  SHADOW_SCALE: 3
  SHADOW_GRANULARITY: 8
  SHADOW_OFFSET: 0x10000000000000
  ==138401==Installed the sigaction for signal 11
  ==138401==Installed the sigaction for signal 7
  ==138401==Installed the sigaction for signal 8
  ==138401==T0: stack [0x03ffff800000,0x040000000000) size 0x800000; local=0x03ffffffe6d0
  ==138401==AddressSanitizer Init done

Any suggestion what might be doing on here?

@hans : This commit went in just shortly before the LLVM 9 branch, which means that currently the test suite is failing on the branch.  We'll want to backport the fix once it is available ...


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63877/new/

https://reviews.llvm.org/D63877





More information about the llvm-commits mailing list