New issue
Advanced search Search tips

Issue 917109 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug
Build-Toolchain



Sign in to add a comment

amd64-generic-ubsan-fuzzer failing in BuildPackages (dev-rust/p9)

Project Member Reported by manojgupta@chromium.org, Dec 20

Issue description

Looks like p9 fuzzer can't be built in ubsan builder.

p9-0.1.0-r2:      Running `rustc --crate-name p9_tframe_decode_fuzzer tframe_decode.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=9d03c3cf32d461c3 -C extra-filename=-9d03c3cf32d461c3 --out-dir /build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps --target x86_64-cros-linux-gnu -C linker=x86_64-cros-linux-gnu-clang -C incremental=/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/incremental -L dependency=/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps -L dependency=/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/debug/deps --extern p9=/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/libp9-c5f00b8877de334b.rlib --cfg fuzzing -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-trace-pc-guard -Cllvm-args=-sanitizer-coverage-trace-compares -Cllvm-args=-sanitizer-coverage-trace-divs -Cllvm-args=-sanitizer-coverage-trace-geps -Cllvm-args=-sanitizer-coverage-prune-blocks=0 -Clink-arg=-L/usr/lib64/clang/8.0.0/lib/linux -Clink-arg=-lclang_rt.fuzzer-x86_64 -Clink-arg=-lc++`
p9-0.1.0-r2: error: linking with `x86_64-cros-linux-gnu-clang` failed: exit code: 1
p9-0.1.0-r2:   |
p9-0.1.0-r2:   = note: "x86_64-cros-linux-gnu-clang" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.1pfh5dtexremgc03.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.2400ytllig505w86.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.2kgdig5y3jydroya.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.39pqgid3nuydz56v.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.3n9wwponk5pof5uv.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.43fs79c9q7cnkbro.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.ak0s97t58hwjxo8.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.dbzg1l3oxk9uj0q.rcgu.o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.f8kn3g33j7eie89.rcgu.o" "-o" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/p9_tframe_decode_fuzzer-9d03c3cf32d461c3.2zg2uyyzzs09y06r.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps" "-L" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/debug/deps" "-L" "/usr/lib64/rust/rustlib/x86_64-cros-linux-gnu/lib" "-L" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/libp9-c5f00b8877de334b.rlib" "/build/amd64-generic/tmp/portage/dev-rust/p9-0.1.0-r2/work/x86_64-cros-linux-gnu/debug/deps/liblibc-25574bb8d2ec4b4d.rlib" "-Wl,--start-group" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b86dd14ec2a0d983.rlib" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1b18d2264cdcfb63.rlib" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-1b5c2dfdb82695d0.rlib" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-26bd5d3525ea0442.rlib" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-c9c2dcd46cb83871.rlib" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a6f391ba72d3983c.rlib" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/libcore-c3c7fd873a618632.rlib" "-Wl,--end-group" "/usr/lib64/rust/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-7b34a893930d7f9b.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-L/usr/lib64/clang/8.0.0/lib/linux" "-lclang_rt.fuzzer-x86_64" "-lc++"
p9-0.1.0-r2:   = note: /usr/lib64/clang/8.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerDriver.cpp.o):function fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)): error: undefined reference to 'atexit'
p9-0.1.0-r2:           clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
p9-0.1.0-r2:           
p9-0.1.0-r2: 
p9-0.1.0-r2: error: aborting due to previous error
p9-0.1.0-r2: 
p9-0.1.0-r2: error: Could not compile `p9-fuzz`.
p9-0.1.0-r2: 
 
Chirantan, can you restrict the fuzzer to be included with asan + fuzzer builds?

Probably modifying the RDEPEND in chromium-os-fuzzers ebuild to include p9 only when asan USE is set will work.
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 22

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

commit a7a354d4523bb1851c48b6cb9ab74d76d84e2703
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Sat Dec 22 05:38:28 2018

chromium-os-fuzzers: Only build rust fuzzers under asan

There is no ubsan in rust and msan triggers a crash in the standard
library so for now only build rust fuzzers when we are using asan.

BUG= chromium:917109 
TEST=USE="ubsan fuzzer" emerge-eve -pv chromium-os-fuzzers

Change-Id: I665e2a16d0a4817cc8067d0c715695b0fde4fb89
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1387748
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>

[modify] https://crrev.com/a7a354d4523bb1851c48b6cb9ab74d76d84e2703/virtual/chromium-os-fuzzers/chromium-os-fuzzers-1.ebuild
[rename] https://crrev.com/a7a354d4523bb1851c48b6cb9ab74d76d84e2703/virtual/chromium-os-fuzzers/chromium-os-fuzzers-1-r24.ebuild

Status: Fixed (was: Assigned)

Sign in to add a comment