[compiler-rt] r237149 - [sanitizer] Update "sancov.py missing" to allow __sanitizer_cov_with_check().

Sergey Matveev earthdok at google.com
Tue May 12 09:46:54 PDT 2015


Author: smatveev
Date: Tue May 12 11:46:54 2015
New Revision: 237149

URL: http://llvm.org/viewvc/llvm-project?rev=237149&view=rev
Log:
[sanitizer] Update "sancov.py missing" to allow __sanitizer_cov_with_check().

Modified:
    compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py

Modified: compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py?rev=237149&r1=237148&r2=237149&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py (original)
+++ compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py Tue May 12 11:46:54 2015
@@ -180,8 +180,12 @@ def RawUnpack(files):
     UnpackOneRawFile(f, f_map)
 
 def GetInstrumentedPCs(binary):
+  # This looks scary, but all it does is extract all offsets where we call:
+  # - __sanitizer_cov() or __sanitizer_cov_with_check(),
+  # - with call or callq,
+  # - directly or via PLT.
   cmd = "objdump -d %s | " \
-        "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(@plt\|\)>' | " \
+        "grep '^\s\+[0-9a-f]\+:.*\scall\(q\|\)\s\+[0-9a-f]\+ <__sanitizer_cov\(_with_check\|\)\(@plt\|\)>' | " \
         "grep '^\s\+[0-9a-f]\+' -o" % binary
   proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
                           shell=True)





More information about the llvm-commits mailing list