[compiler-rt] r363640 - [NFC] Split `Darwin/asan-symbolize-partial-report-with-module-map.cc`.

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 18:38:02 PDT 2019


Author: delcypher
Date: Mon Jun 17 18:38:02 2019
New Revision: 363640

URL: http://llvm.org/viewvc/llvm-project?rev=363640&view=rev
Log:
[NFC] Split `Darwin/asan-symbolize-partial-report-with-module-map.cc`.

Split `Darwin/asan-symbolize-partial-report-with-module-map.cc` into two
separate test cases due to them testing slightly different things.

Added:
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc
      - copied, changed from r363639, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc
Modified:
    compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc

Copied: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc (from r363639, compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc?p2=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc&p1=compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc&r1=363639&r2=363640&rev=363640&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-no-external-symbolizer.cc Mon Jun 17 18:38:02 2019
@@ -10,23 +10,6 @@
 // RUN: %asan_symbolize --force-system-symbolizer < %t2.log > %t2.fully_symbolized
 // RUN: FileCheck -input-file=%t2.fully_symbolized -check-prefix=CHECK-FS %s
 
-// Due a quirk in the way atos reports module names we have to use the module
-// map here, otherwise we don't know what the full path to the module is.
-
-// FIXME(dliew): We currently have to use module map for this test due to the atos
-// symbolizer changing the module name from an absolute path to just the file name.
-// rdar://problem/49784442
-//
-// Simulate partial symbolication (can happen with %L specifier) by printing
-// out %L's fallback which will print the module name and offset instead of a
-// source location.
-// RUN: %clangxx_asan -O0 -g %s -o %t2.executable
-// RUN: %env_asan_opts=symbolize=1,print_module_map=1,stack_trace_format='"    #%%n %%p %%F %%M"' not %run %t.executable > %t2.log 2>&1
-// RUN: FileCheck -input-file=%t2.log -check-prefix=CHECK-PS %s
-// Now try to full symbolicate using the module map.
-// RUN: %asan_symbolize --module-map %t2.log --force-system-symbolizer < %t2.log > %t2.fully_symbolized
-// RUN: FileCheck -input-file=%t2.fully_symbolized -check-prefix=CHECK-FS %s
-
 #include <cstdlib>
 
 // Partially symbolicated back-trace where symbol is available but
@@ -39,7 +22,7 @@
 // CHECK-FS: WRITE of size 4
 
 extern "C" void foo(int* a) {
-  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-with-module-map.cc:[[@LINE+1]]
+  // CHECK-FS: #0 0x{{.+}} in foo {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cc:[[@LINE+1]]
   *a = 5;
 }
 
@@ -48,7 +31,7 @@ int main() {
   if (!a)
     return 0;
   free(a);
-  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-with-module-map.cc:[[@LINE+1]]
+  // CHECK-FS: #1 0x{{.+}} in main {{.*}}asan-symbolize-partial-report-no-external-symbolizer.cc:[[@LINE+1]]
   foo(a);
   return 0;
 }

Modified: compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc?rev=363640&r1=363639&r2=363640&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Darwin/asan-symbolize-partial-report-with-module-map.cc Mon Jun 17 18:38:02 2019
@@ -1,18 +1,3 @@
-// When `external_symbolizer_path` is empty on Darwin we fallback on using
-// dladdr as the symbolizer which means we get the symbol name
-// but no source location. The current implementation also doesn't try to
-// change the module name so we end up with the full name so we actually don't
-// need the module map here.
-
-// RUN: %clangxx_asan -O0 -g %s -o %t.executable
-// RUN: %env_asan_opts=symbolize=1,print_module_map=0,external_symbolizer_path= not %run %t.executable > %t2.log 2>&1
-// RUN: FileCheck -input-file=%t2.log -check-prefix=CHECK-PS %s
-// RUN: %asan_symbolize --force-system-symbolizer < %t2.log > %t2.fully_symbolized
-// RUN: FileCheck -input-file=%t2.fully_symbolized -check-prefix=CHECK-FS %s
-
-// Due a quirk in the way atos reports module names we have to use the module
-// map here, otherwise we don't know what the full path to the module is.
-
 // FIXME(dliew): We currently have to use module map for this test due to the atos
 // symbolizer changing the module name from an absolute path to just the file name.
 // rdar://problem/49784442
@@ -20,12 +5,12 @@
 // Simulate partial symbolication (can happen with %L specifier) by printing
 // out %L's fallback which will print the module name and offset instead of a
 // source location.
-// RUN: %clangxx_asan -O0 -g %s -o %t2.executable
-// RUN: %env_asan_opts=symbolize=1,print_module_map=1,stack_trace_format='"    #%%n %%p %%F %%M"' not %run %t.executable > %t2.log 2>&1
-// RUN: FileCheck -input-file=%t2.log -check-prefix=CHECK-PS %s
+// RUN: %clangxx_asan -O0 -g %s -o %t.executable
+// RUN: %env_asan_opts=symbolize=1,print_module_map=1,stack_trace_format='"    #%%n %%p %%F %%M"' not %run %t.executable > %t.log 2>&1
+// RUN: FileCheck -input-file=%t.log -check-prefix=CHECK-PS %s
 // Now try to full symbolicate using the module map.
-// RUN: %asan_symbolize --module-map %t2.log --force-system-symbolizer < %t2.log > %t2.fully_symbolized
-// RUN: FileCheck -input-file=%t2.fully_symbolized -check-prefix=CHECK-FS %s
+// RUN: %asan_symbolize --module-map %t.log --force-system-symbolizer < %t.log > %t.fully_symbolized
+// RUN: FileCheck -input-file=%t.fully_symbolized -check-prefix=CHECK-FS %s
 
 #include <cstdlib>
 




More information about the llvm-commits mailing list