Skip to content

Commit

Permalink
[elfutils] no longer compile srcfiles.cxx
Browse files Browse the repository at this point in the history
srcfiles.cxx started failing to compile with the OSS-Fuzz toolchain
when it was switched from clang-18.0.0 to clang-18.1.8 in
google#12365.
google#12365 (comment)
It's probably an OSS-Fuzz toolchain bug but it doesn't matter much
because the srcfiles binary isn't relevant in terms of fuzzing and
can safely be excluded.
  • Loading branch information
evverx committed Oct 2, 2024
1 parent 91d4aba commit 2675320
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions projects/elfutils/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ sed -i 's/^\(NO_UNDEFINED=\).*/\1/' configure.ac
# https://clang.llvm.org/docs/AddressSanitizer.html#usage
sed -i 's/^\(ZDEFS_LDFLAGS=\).*/\1/' configure.ac

# srcfiles.cxx started failing to compile with the OSS-Fuzz toolchain
# when it was switched from clang-18.0.0 to clang-18.1.8 in
# https://github.com/google/oss-fuzz/pull/12365.
# https://github.com/google/oss-fuzz/pull/12365#discussion_r1784702452
# It's probably an OSS-Fuzz toolchain bug but it doesn't matter much
# because the srcfiles binary isn't relevant in terms of fuzzing and
# can safely be excluded.
sed -i 's/^\(srcfiles_\)/#/' src/Makefile.am
sed -i 's/\bsrcfiles\b//' src/Makefile.am

if [[ "$SANITIZER" == undefined ]]; then
additional_ubsan_checks=alignment
UBSAN_FLAGS="-fsanitize=$additional_ubsan_checks -fno-sanitize-recover=$additional_ubsan_checks"
Expand Down

0 comments on commit 2675320

Please sign in to comment.