1 // REQUIRES: android 2 3 // Tests that ubsan can detect errors on Android if libc appears before the 4 // runtime in the library search order, which means that we cannot intercept 5 // symbols. 6 7 // RUN: %clangxx %p/Inputs/no-interception-dso.c -fsanitize=undefined -fPIC -shared -o %dynamiclib %ld_flags_rpath_so 8 9 // Make sure that libc is first in DT_NEEDED. 10 // RUN: %clangxx %s -lc -o %t %ld_flags_rpath_exe 11 // RUN: %run %t 2>&1 | FileCheck %s 12 13 #include <limits.h> 14 15 int dso_function(int); 16 17 int main(int argc, char **argv) { 18 // CHECK: signed integer overflow 19 dso_function(INT_MAX); 20 } 21