git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Josh Steadmon <steadmon@google.com>
To: Andrzej Hunt via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Andrzej Hunt <andrzej@ahunt.org>,
	Andrzej Hunt <ajrhunt@google.com>
Subject: Re: [PATCH] Update 'make fuzz-all' docs to reflect modern clang
Date: Mon, 1 Mar 2021 14:39:34 -0800	[thread overview]
Message-ID: <YD1tJlY/mqZOmTNm@google.com> (raw)
In-Reply-To: <pull.889.git.1614514959347.gitgitgadget@gmail.com>

On 2021.02.28 12:22, Andrzej Hunt via GitGitGadget wrote:
> 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

Thanks for taking a look at this! This looked correct to me, but when I
tried to run the fuzzers I got an error about
"-fsanitize-coverage=trace-pc-guard" not being supported any longer.
Looking at the LLVM 11.0.0 docs [1], I see that it recommends using
"-fsanitize=fuzzer-no-link" instead (the "-no-link" is because we're
also building executables that have their own main()).

So we'd also want to change CFLAGS to
"-fsanitize=fuzzer-no-link,address".

[1]: https://releases.llvm.org/11.0.0/docs/LibFuzzer.html#fuzzer-usage

  reply	other threads:[~2021-03-02 11:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28 12:22 [PATCH] Update 'make fuzz-all' docs to reflect modern clang Andrzej Hunt via GitGitGadget
2021-03-01 22:39 ` Josh Steadmon [this message]
2021-03-04 15:26   ` Andrzej Hunt
2021-03-04 15:28 ` [PATCH v2] " Andrzej Hunt via GitGitGadget
2021-03-04 22:48   ` Junio C Hamano
2021-03-08 17:05     ` Andrzej Hunt
2021-03-08 18:28       ` Junio C Hamano
2021-03-10 18:50     ` Josh Steadmon
2021-03-08 17:14   ` [PATCH v3] Makefile: update " Andrzej Hunt via GitGitGadget
2021-03-10 18:52     ` Josh Steadmon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YD1tJlY/mqZOmTNm@google.com \
    --to=steadmon@google.com \
    --cc=ajrhunt@google.com \
    --cc=andrzej@ahunt.org \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).