git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Update 'make fuzz-all' docs to reflect modern clang

From
Andrzej Hunt via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 28, 2021, 12:22 UTC
Message-ID
<pull.889.git.1614514959347.gitgitgadget@gmail.com>
From: Andrzej Hunt <ajrhunt@google.com>

Clang no longer produces a libFuzzer.a, instead you can include libFuzzer by using -fsanitize=fuzzer. Therefore we should use that in the example command for building fuzzers.

I happen to have tested with LLVM 11 - however -fsanitize=fuzzer appears to work in a wide range of reasonably modern clangs.

(On my system what used to be libFuzzer.a now lives under the following path,
 which is tricky albeit not impossible for a novice such as myself to find:
/usr/lib64/clang/11.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a )
Signed-off-by: Andrzej Hunt <ajrhunt@google.com>
---
    Update 'make fuzz-all' docs to reflect modern clang
    
    I would like to update the examples for 'make fuzz-all' to make it
    easier to build fuzzers locally.
    
    This change should make it easier for the uninitiated to build fuzzers
    locally without first having to figure out what LIB_FUZZING_ENGINE is
    for.
    
    ATB, Andrzej
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-889%2Fahunt%2Ffuzz-docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-889/ahunt/fuzz-docs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/889
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 9b1bde2e0e64..9f8f459f87b4 100644
--- a/Makefile
+++ b/Makefile
@@ -3291,11 +3291,11 @@ cover_db_html: cover_db
 # are not necessarily appropriate for general builds, and that vary greatly
 # depending on the compiler version used.
 #
-# An example command to build against libFuzzer from LLVM 4.0.0:
+# An example command to build against libFuzzer from LLVM 11.0.0:
 #
 # make CC=clang CXX=clang++ \
 #      CFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \
-#      LIB_FUZZING_ENGINE=/usr/lib/llvm-4.0/lib/libFuzzer.a \
+#      LIB_FUZZING_ENGINE=-fsanitize=fuzzer \
 #      fuzz-all
 #
 FUZZ_CXXFLAGS ?= $(CFLAGS)

base-commit: 225365fb5195e804274ab569ac3cc4919451dc7f
-- 
gitgitgadget
Next: Josh Steadmon
Message 1 of 10 in “Update 'make fuzz-all' docs to reflect modern clang”
  1. Update 'make fuzz-all' docs to reflect modern clangAndrzej Hunt via GitGitGadget, Feb 28, 2021
  2. Josh SteadmonMar 1, 2021
  3. Andrzej HuntMar 4, 2021
  4. Update 'make fuzz-all' docs to reflect modern clangAndrzej Hunt via GitGitGadget, Mar 4, 2021
  5. Junio C HamanoMar 4, 2021
  6. Andrzej HuntMar 8, 2021
  7. Junio C HamanoMar 8, 2021
  8. Josh SteadmonMar 10, 2021
  9. Makefile: update 'make fuzz-all' docs to reflect modern clangAndrzej Hunt via GitGitGadget, Mar 8, 2021
  10. Josh SteadmonMar 10, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.