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

Issue 591008 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Mar 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 539572



Sign in to add a comment

create .gn build config in libfuzzer upstream

Project Member Reported by mmoroz@chromium.org, Mar 1 2016

Issue description

List libfuzzer source files in the upstream config, then depend on them in chromium repo.
 
Owner: aizatsky@chromium.org
Review: http://reviews.llvm.org/D17773

Comment 2 by kcc@chromium.org, Mar 1 2016

I don't mind, but others in LLVM may be opposed to this. 
We should use some form of globing in the chromium, see  issue 590869 

Comment 3 by kcc@chromium.org, Mar 1 2016

scratch that. I am actually quite against this change in llvm, it's ridiculous. 
We can not test it upstream and so the gn file will be broken have the time we add/remove files. 
I've also tried to implement this locally (did the same change as Mike) and got the following problem when building any fuzzer (for example, zlib_uncompress_fuzzer):

$ gn clean out/Release && gn gen out/Release && ninja -C out/Release -j 2048 zlib_uncompress_fuzzer &&  out/Release/zlib_uncompress_fuzzer -h
Done. Wrote 3208 targets from 865 files in 849ms
ninja: Entering directory `out/Release'
[83/88] SOLINK ./libc++.so
clang: warning: argument unused during compilation: '-pthread'
[88/88] LINK ./zlib_uncompress_fuzzer
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,--fatal-warnings -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -B../../third_party/binutils/Linux_x64/Release/bin -fuse-ld=gold -pthread -m64 -Wl,-O1 -Wl,--gc-sections --sysroot=../../build/linux/debian_wheezy_amd64-sysroot  -fsanitize=address -Wl,-rpath-link=../Release -Wl,--disable-new-dtags -Wl,-rpath=\$ORIGIN/. -Wl,-rpath-link=. -Wl,-u_sanitizer_options_link_helper -fsanitize=address -L. -o "./zlib_uncompress_fuzzer" -Wl,--start-group @"./zlib_uncompress_fuzzer.rsp" ./libc++.so -Wl,--end-group  -ldl -lrt 
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/build/config/sanitizers/options_sources/sanitizer_options.o: multiple definition of '__asan_default_options'
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: obj/third_party/llvm/lib/Fuzzer/libfuzzer_sources/FuzzerSanitizerOptions.o: previous definition here
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: warning: Cannot export local symbol '__asan_default_options'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Comment 5 by kcc@chromium.org, Mar 1 2016

I was going to delete FuzzerSanitizerOptions.cpp. Let me do it *now*. 
It seems that source_set is not the same as list of source files, because files get compiled for source_set target. Then during linking we have the same symbols in source_set and //build/config/sanitizers/.

Honestly I don't understand how to mitigate this, we just need a 'macros' for list of source files or force wildcard support in GN configs.

Comment 7 by kcc@chromium.org, Mar 1 2016

 http://llvm.org/viewvc/llvm-project?rev=262354&view=rev removed FuzzerSanitizerOptions.cpp
Please update the gn file to remove FuzzerSanitizerOptions.cpp
Then we should use globing. 
Blocking: -591022
Status: WontFix (was: Assigned)

Sign in to add a comment