From: Simon Ruderich Date: Sat, 4 Jan 2020 11:12:41 +0000 (+0100) Subject: Fix false positive in `dwz` lines X-Git-Tag: 0.11~2 X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=commitdiff_plain;h=f0a9d412466ca504fb2e279e1d98718a9c2bab28 Fix false positive in `dwz` lines --- diff --git a/NEWS b/NEWS index df6f7a5..097d76b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,13 @@ NEWS ==== +Version 0.XX +------------ + +- Fix false positive in `dwz` lines; reported by Raphaël Hertzog (Debian Bug + #948009). + + Version 0.10 ------------ diff --git a/bin/blhc b/bin/blhc index 5fabc39..e84b12b 100755 --- a/bin/blhc +++ b/bin/blhc @@ -1061,6 +1061,7 @@ foreach my $file (@ARGV) { # look like a compiler executable thus causing the line to be # treated as a normal compiler line. next if $line =~ m{^\s*rm\s+}; + next if $line =~ m{^\s*dwz\s+}; # Some build systems emit "gcc > file". next if $line =~ m{$cc_regex_normal\s*>\s*\S+}o; # Hex output may contain "cc". diff --git a/t/logs/false-positives b/t/logs/false-positives index d21f4f7..8e7d6c3 100644 --- a/t/logs/false-positives +++ b/t/logs/false-positives @@ -8,6 +8,9 @@ swig -Wall -c++ -python test.i rm -f afl-gcc afl-as afl-fuzz afl-showmap as afl-g++ afl-clang afl-clang++ *.o *~ a.out core core.[1-9][0-9]* *.stackdump test .test test-instr .test-instr0 .test-instr1 + dwz -mdebian/afl\+\+/usr/lib/debug/.dwz/x86_64-linux-gnu/afl\+\+.debug -M/usr/lib/debug/.dwz/x86_64-linux-gnu/afl\+\+.debug -- debian/afl\+\+/usr/bin/afl-analyze debian/afl\+\+/usr/bin/afl-fuzz debian/afl\+\+/usr/bin/afl-gcc debian/afl\+\+/usr/bin/afl-gotcpu debian/afl\+\+/usr/bin/afl-showmap debian/afl\+\+/usr/bin/afl-tmin debian/afl\+\+/usr/lib/afl/afl-as debian/afl\+\+/usr/lib/afl/libdislocator.so debian/afl\+\+/usr/lib/afl/libtokencap.so + dwz -mdebian/afl\+\+-clang/usr/lib/debug/.dwz/x86_64-linux-gnu/afl\+\+-clang.debug -M/usr/lib/debug/.dwz/x86_64-linux-gnu/afl\+\+-clang.debug -- debian/afl\+\+-clang/usr/bin/afl-clang-fast debian/afl\+\+-clang/usr/lib/afl/afl-llvm-pass.so + # "Missing" flags in comments should be ignored. # gcc -E tag_tree.list does not work, so use a .c name