New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 597066 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 539572



Sign in to add a comment

Libfuzzer support on mac

Project Member Reported by aizatsky@chromium.org, Mar 22 2016

Issue description

Support for building and running on CF of mac fuzzers.
 

Comment 1 by rsesek@chromium.org, Mar 22 2016

Cc: rsesek@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d859208cab47c131d7374c9ac7c01dc4bcab198a

commit d859208cab47c131d7374c9ac7c01dc4bcab198a
Author: kjellander <kjellander@chromium.org>
Date: Thu Mar 31 15:51:40 2016

Revert of [libfuzzer] supporting libfuzzer on mac with asan (patchset #6 id:100001 of https://codereview.chromium.org/1818273002/ )

Reason for revert:
I've spent a fair amount of time trying to debug this and come up with a workaround for us.
Our bot (https://build.chromium.org/p/tryserver.webrtc/builders/mac_gn_rel/builds/8218/) doesn't have ASan enabled do I don't even see why we're hit by the error we're seeing.

I'll revert this for now waiting for the correct fix since there were several problems with this CL.

FYI: I'm also unable to locate the tsan and ubsan libraries in LLVM: my checkout only has the asan one:
$ find third_party/llvm-build/Release+Asserts/ -name libclang*
third_party/llvm-build/Release+Asserts//lib/clang/3.9.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
third_party/llvm-build/Release+Asserts//lib/clang/3.9.0/lib/darwin/libclang_rt.profile_osx.a

Original issue's description:
> Experimental support for fuzzing on mac.
>
> BUG= 597066 
>
> Committed: https://crrev.com/e9aba58f6cbfee6fec2af0ec4832a3c23ec66b9f
> Cr-Commit-Position: refs/heads/master@{#383389}

TBR=dpranke@chromium.org,kcc@chromium.org,glider@chromium.org,rsesek@chromium.org,aizatsky@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 597066 

Review URL: https://codereview.chromium.org/1847803003

Cr-Commit-Position: refs/heads/master@{#384289}

[modify] https://crrev.com/d859208cab47c131d7374c9ac7c01dc4bcab198a/BUILD.gn
[modify] https://crrev.com/d859208cab47c131d7374c9ac7c01dc4bcab198a/build/config/sanitizers/BUILD.gn
[modify] https://crrev.com/d859208cab47c131d7374c9ac7c01dc4bcab198a/build/config/sanitizers/sanitizers.gni
[modify] https://crrev.com/d859208cab47c131d7374c9ac7c01dc4bcab198a/testing/libfuzzer/BUILD.gn
[modify] https://crrev.com/d859208cab47c131d7374c9ac7c01dc4bcab198a/testing/libfuzzer/fuzzer_test.gni

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af4961161ff330e5ae98fe14a67809ecf387c0e8

commit af4961161ff330e5ae98fe14a67809ecf387c0e8
Author: aizatsky <aizatsky@chromium.org>
Date: Fri Apr 15 19:26:32 2016

[libfuzzer] fetch libfuzzer on mac and register it in build root.

Partial resubmit of https://crrev.com/e9aba58f6cbfee6fec2af0ec4832a3c23ec66b9f

BUG= 597066 

Review URL: https://codereview.chromium.org/1885093004

Cr-Commit-Position: refs/heads/master@{#387670}

[modify] https://crrev.com/af4961161ff330e5ae98fe14a67809ecf387c0e8/BUILD.gn
[modify] https://crrev.com/af4961161ff330e5ae98fe14a67809ecf387c0e8/DEPS

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d476d8d12ec348f2f8ceb7012f6cb56369c7fb16

commit d476d8d12ec348f2f8ceb7012f6cb56369c7fb16
Author: aizatsky <aizatsky@chromium.org>
Date: Mon Apr 18 22:28:31 2016

[sanitizers] Using correct dynamic linking option on mac.

BUG= 597066 

Review URL: https://codereview.chromium.org/1897833003

Cr-Commit-Position: refs/heads/master@{#388051}

[modify] https://crrev.com/d476d8d12ec348f2f8ceb7012f6cb56369c7fb16/build/config/sanitizers/BUILD.gn

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38f0d4a34de0f51b8798d850511e627e959a3422

commit 38f0d4a34de0f51b8798d850511e627e959a3422
Author: aizatsky <aizatsky@chromium.org>
Date: Thu Apr 21 03:10:42 2016

[libfuzzer] replace static_library with source_set

BUG= 597066 

Review URL: https://codereview.chromium.org/1903153003

Cr-Commit-Position: refs/heads/master@{#388678}

[modify] https://crrev.com/38f0d4a34de0f51b8798d850511e627e959a3422/testing/libfuzzer/BUILD.gn

Project Member

Comment 8 by bugdroid1@chromium.org, May 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8af17fa910a2e11ca06419d302a302a963399929

commit 8af17fa910a2e11ca06419d302a302a963399929
Author: aizatsky <aizatsky@chromium.org>
Date: Wed May 04 18:37:27 2016

[sanitizers] do not add -lclang_rt on mac.

Clang frontend adds appropriate -l options automatically depending
on -fsanitize value.

BUG= 597066 

Review-Url: https://codereview.chromium.org/1948873002
Cr-Commit-Position: refs/heads/master@{#391578}

[modify] https://crrev.com/8af17fa910a2e11ca06419d302a302a963399929/build/config/sanitizers/BUILD.gn

Project Member

Comment 9 by bugdroid1@chromium.org, May 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ef929b6651816a5fb17e912dc44c02529c42a24

commit 6ef929b6651816a5fb17e912dc44c02529c42a24
Author: aizatsky <aizatsky@chromium.org>
Date: Wed May 04 23:45:31 2016

Roll buildtools to 731bdb2af8b5839450605ddebdcf5de749cf9d17

731bdb2 [sanitizers] supporting libc++ asan build on mac.
b4232ff Always set symbol visibility when compiling with GCC / Clang.
431de63 Properly configure patch project for trybot usage

BUG= 597066 

Review-Url: https://codereview.chromium.org/1946273003
Cr-Commit-Position: refs/heads/master@{#391696}

[modify] https://crrev.com/6ef929b6651816a5fb17e912dc44c02529c42a24/DEPS

Project Member

Comment 10 by bugdroid1@chromium.org, May 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45384fb36763bb34ac3a7395d2dc941754a276ae

commit 45384fb36763bb34ac3a7395d2dc941754a276ae
Author: rsesek <rsesek@chromium.org>
Date: Thu May 12 19:46:22 2016

[Mac/GN][sanitizers] Copy the ASan runtime to the output directory.

This sets it as a data_deps so that any targets depending on the sanitizer
will also pick up the runtime file when being isolated.

Because the ASan runtime uses @loader_path this will not work for bundled
targets, only standalone executables.

BUG= 597066 , 431177 
R=aizatsky@chromium.org

Review-Url: https://codereview.chromium.org/1963253002
Cr-Commit-Position: refs/heads/master@{#393335}

[modify] https://crrev.com/45384fb36763bb34ac3a7395d2dc941754a276ae/base/BUILD.gn
[modify] https://crrev.com/45384fb36763bb34ac3a7395d2dc941754a276ae/build/config/sanitizers/BUILD.gn

Labels: OS-Mac
Status: Fixed (was: Assigned)
It is now possible to build fuzzers on mac within the chrome tree. See https://chromium.googlesource.com/chromium/src.git/+/master/testing/libfuzzer/reference.md#Mac for details.

Closing the issue. 
Thanks for getting this working. I just landed a Mac-specific fuzzer, but I don't see any libFuzzer jobs on the Clusterfuzz dashboard. Do we need to set one up?
There's no Mac support on CF side AFAIK.
Looking at https://cluster-fuzz.appspot.com/#jobs I do see some ASan Mac jobs, but none for libFuzzer.
Cc: mbarbe...@chromium.org
We do have a small number of mac bots - we can probably dedicate a few to libfuzzer.
We support Mac, but it hasn't been too useful to date. We've been in serious need of some Mac-specific fuzzers. Most of the bugs found on those bots could have been found on any platform. I'd be happy to dedicate a chunk of the Mac bots to libFuzzer for this.
Great! https://chromium.googlesource.com/chromium/src/+/8e3b34f9381d4c90d5b8af0a618f571d893a15b5 is the Mac-specific fuzzer that I just landed.
Filed bug 612604 to track work for this.

I might not be able to get around to this for a while, so if anyone is interested feel free to pick it up (mostly just setting up the builder).

Sign in to add a comment