diff options
| author | Ryan Govostes <rzg@apple.com> | 2016-06-24 06:49:01 +0000 | 
|---|---|---|
| committer | Ryan Govostes <rzg@apple.com> | 2016-06-24 06:49:01 +0000 | 
| commit | 00f607eef06dec993c34bb5f6d60554a6c22a8fa (patch) | |
| tree | 4eac6d1d3b90cc3aa335306b8342567e7f269237 | |
| parent | c581611e11776e50705a4afc4013cbfc5beba4fe (diff) | |
| download | bcm5719-llvm-00f607eef06dec993c34bb5f6d60554a6c22a8fa.tar.gz bcm5719-llvm-00f607eef06dec993c34bb5f6d60554a6c22a8fa.zip  | |
Change shared library load path to appease Android bot
llvm-svn: 273654
| -rw-r--r-- | compiler-rt/test/asan/TestCases/Posix/global-registration.c | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler-rt/test/asan/TestCases/Posix/global-registration.c b/compiler-rt/test/asan/TestCases/Posix/global-registration.c index 95e8eac6595..fb1e1ca6d41 100644 --- a/compiler-rt/test/asan/TestCases/Posix/global-registration.c +++ b/compiler-rt/test/asan/TestCases/Posix/global-registration.c @@ -5,10 +5,10 @@  // the third is loaded at runtime. We make sure that out-of-bounds accesses  // are caught for all three buffers. -// RUN: %clang_asan -c -o %t-one.o -DDYNAMICLIB=\"%t-dynamic.so\" -DMAIN_FILE %s +// RUN: %clang_asan -c -o %t-one.o -DMAIN_FILE %s  // RUN: %clang_asan -c -o %t-two.o -DSECONDARY_FILE %s  // RUN: %clang_asan -o %t %t-one.o %t-two.o -// RUN: %clang_asan -shared -fPIC -o %t-dynamic.so -DSHARED_LIBRARY_FILE %s +// RUN: %clang_asan -o %t-dynamic.so -shared -fPIC %libdl -DSHARED_LIBRARY_FILE %s  // RUN: not %run %t 1 2>&1 | FileCheck --check-prefix ASAN-CHECK-1 %s  // RUN: not %run %t 2 2>&1 | FileCheck --check-prefix ASAN-CHECK-2 %s  // RUN: not %run %t 3 2>&1 | FileCheck --check-prefix ASAN-CHECK-3 %s @@ -31,7 +31,10 @@ int main(int argc, char *argv[]) {      buffer2[argc] = 0;      // ASAN-CHECK-2: {{0x.* is located 1 bytes .* 'buffer2'}}    } else if (n == 3) { -    void *handle = dlopen(DYNAMICLIB, RTLD_NOW); +    char *libpath; +    asprintf(&libpath, "%s-dynamic.so", argv[0]); +     +    void *handle = dlopen(libpath, RTLD_NOW);      if (!handle) {        fprintf(stderr, "dlopen: %s\n", dlerror());        return 1;  | 

