[compiler-rt] 18e4674 - [Sanitizer][Darwin] Fix log-path_test.cpp

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 16:49:24 PDT 2022


Author: Julian Lettner
Date: 2022-07-05T16:34:55-07:00
New Revision: 18e4674ea6fede17652f3b1ae328da62cdfd11e0

URL: https://github.com/llvm/llvm-project/commit/18e4674ea6fede17652f3b1ae328da62cdfd11e0
DIFF: https://github.com/llvm/llvm-project/commit/18e4674ea6fede17652f3b1ae328da62cdfd11e0.diff

LOG: [Sanitizer][Darwin] Fix log-path_test.cpp

In my previous change [1], I added log output that made a test that
expected "no output" fail.  The easiest solution is to only print the
new hint/warning when we at least ask for `verbosity=1`.

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

Radar-Id: rdar://96437354

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
index 66f4935bb62d7..4b0e678197614 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cpp
@@ -223,10 +223,10 @@ const mach_header *get_dyld_hdr() {
     if (GetMacosAlignedVersion() >= MacosVersion(13, 0)) {
       dyld_hdr = GetDyldImageHeaderViaSharedCache();
       if (!dyld_hdr) {
-        Printf(
-            "Failed to lookup the dyld image header in the shared cache on "
-            "macOS 13+ (or no shared cache in use).  Falling back to lookup via"
-            "vm_region_recurse_64().\n");
+        VReport(1,
+                "Failed to lookup the dyld image header in the shared cache on "
+                "macOS 13+ (or no shared cache in use).  Falling back to "
+                "lookup via vm_region_recurse_64().\n");
         dyld_hdr = GetDyldImageHeaderViaVMRegion();
       }
     } else {


        


More information about the llvm-commits mailing list