[compiler-rt] 637048f - [TSan][Darwin] Test fix external-swift-debugging.cpp

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 11:28:22 PDT 2023


Author: Julian Lettner
Date: 2023-03-23T11:28:15-07:00
New Revision: 637048f122dc5112a86ae8c5c437efa22379127e

URL: https://github.com/llvm/llvm-project/commit/637048f122dc5112a86ae8c5c437efa22379127e
DIFF: https://github.com/llvm/llvm-project/commit/637048f122dc5112a86ae8c5c437efa22379127e.diff

LOG: [TSan][Darwin] Test fix external-swift-debugging.cpp

My recent change [1] extended the external-swift-debugging.cpp test, but
didn't account for PAC under which function pointers aren't trivially
comparable. We could use `ptrauth_strip()`, but for the test it's easier
to just the symbol name.

[1] https://reviews.llvm.org/D146264

Added: 
    

Modified: 
    compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp b/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp
index 64475a3e97373..8f8b2d514ea0b 100644
--- a/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp
+++ b/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp
@@ -30,9 +30,6 @@ int main(int argc, char *argv[]) {
   fprintf(stderr, "Start.\n");
   // CHECK: Start.
 
-  fprintf(stderr, "ExternalWrite function address: %p\n", &ExternalWrite);
-  // CHECK: ExternalWrite function address: [[ExternalWrite_addr:0x[0-9a-z]+]]
-
   void *opaque_object = malloc(16);
   std::thread t1([opaque_object] {
     ExternalWrite(opaque_object);
@@ -85,7 +82,7 @@ __tsan_on_report(void *report) {
             info.dli_saddr, info.dli_sname);
   }
   // Ensure ExternalWrite() function is top of trace
-  // CHECK: 0: frame: 0x{{[0-9a-z]+}}, function: [[ExternalWrite_addr]] _Z13ExternalWritePv
+  // CHECK: 0: frame: 0x{{[0-9a-z]+}}, function: 0x{{[0-9a-z]+}} _Z13ExternalWritePv
 }
 
 // CHECK: Done.


        


More information about the llvm-commits mailing list