Skip to content

Commit fe62be1

Browse files
committed
Add support for llvm-cov compiled binaries.
Add a check when ensuring the binary was instrumented with gcov to catch an llvm-cov binary.
1 parent 3689705 commit fe62be1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

afl-cov

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,13 @@ def is_bin_gcov_enabled(binary, cargs):
821821
False, cargs, WANT_OUTPUT)[1]:
822822
if ' __gcov' in line:
823823
if cargs.validate_args or cargs.gcov_check or cargs.gcov_check_bin:
824-
print "[+] Binary '%s' is compiled with code coverage support." % binary
824+
print "[+] Binary '%s' is compiled with code coverage support gcc." % binary
825+
rv = True
826+
break
827+
828+
if '__llvm_gcov' in line:
829+
if cargs.validate_args or cargs.gcov_check or cargs.gcov_check_bin:
830+
print "[+] Binary '%s' is compiled with code coverage support via llvm." % binary
825831
rv = True
826832
break
827833

0 commit comments

Comments
 (0)