New issue
Advanced search Search tips

Issue 870498 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Build-Toolchain



Sign in to add a comment

Decouple asan USE flags from fuzzer

Project Member Reported by manojgupta@chromium.org, Aug 2

Issue description

Currently, use of fuzzer flag needs asan flag.
We should deocuple it so that we could fuzzer flag with non-asan builds or different sanitizers/coverage builds etc.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/81d284e1ff1372678172baa5c899982478310069

commit 81d284e1ff1372678172baa5c899982478310069
Author: Manoj Gupta <manojgupta@google.com>
Date: Fri Aug 03 08:31:18 2018

platform: Do not force asan flag with fuzzer.

We want to to use fuzzer builds with different sanitizers, coverage
builds etc.
So stop forcing asan use flag with fuzzer.
This does not change a developer or builder workflow.

BUG= chromium:870498 
TEST=USE="-asan fuzzer" emerge-amd64-generic puffin works.

Change-Id: I50922db51856b97dfecba95de2fe68c5bd2ed663
Reviewed-on: https://chromium-review.googlesource.com/1161484
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/81d284e1ff1372678172baa5c899982478310069/eclass/platform.eclass

In the docs still say fuzzer authors should add "IUSE="asan fuzzer"" to their fuzzers eclass file.
Should we remove "asan" here and remove it from existing fuzzers?
Adding asan to IUSE only makes the asan flag visible to ebuild but does not enable it. The build system will have to enable it via explicitly adding to USE.
So nothing changes from developer side.

We'll probably be adding more flags to IUSE in future e.g. coverage, msan, ubsan etc.
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/042861eb27d179fe221fe46aa9fb814c81ea6b9c

commit 042861eb27d179fe221fe46aa9fb814c81ea6b9c
Author: Manoj Gupta <manojgupta@google.com>
Date: Thu Aug 16 20:14:58 2018

common-mk: Split up fuzzing flags based on use flags.

Do not pass "-fsanitize=address" unconditionally while fuzzing.
Instead add the flags depending on the USE flags.

This will let us test fuzzers with msan/ubsan etc.

Also add new flags: USE_{asan/coverage/msan/ubsan} to common.gypi.

BUG= chromium:870498 
BUG=chromium:874179

TEST=fuzzers still build with USE="asan"

Change-Id: Idb938693610e0f6055a4af79ade33398332b95bc
Reviewed-on: https://chromium-review.googlesource.com/1176551
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/042861eb27d179fe221fe46aa9fb814c81ea6b9c/common-mk/common_fuzzer.gypi
[modify] https://crrev.com/042861eb27d179fe221fe46aa9fb814c81ea6b9c/common-mk/common.gypi

Labels: cros-fuzzing
Status: Verified (was: Untriaged)

Sign in to add a comment