Closed Bug 1804167 Opened 3 years ago Closed 3 years ago

Perma make: *** [Makefile:100: test_build] Error 1

Categories

(Core :: Fuzzing, defect, P5)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: glandium)

Details

Attachments

(1 file)

Filed by: mh [at] glandium.org
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=398723373&repo=toolchains
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Q44rIf82SHmIdYK_fMXUug/runs/0/artifacts/public/logs/live_backing.log


[task 2022-12-06T00:01:35.103Z] unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; AFL_QUIET=1 AFL_PATH=. AFL_CC=/builds/worker/fetches/clang/bin/clang ../afl-clang-fast -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"//lib/afl\" -DBIN_PATH=\"//bin\" -DVERSION=\"2.56b\"  ../test-instr.c -o test-instr 
[task 2022-12-06T00:01:35.146Z] PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
[task 2022-12-06T00:01:35.146Z] Stack dump:
[task 2022-12-06T00:01:35.147Z] 0.	Program arguments: /builds/worker/fetches/clang/bin/clang-16 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name test-instr.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fcoverage-compilation-dir=/builds/worker/fetches/AFL/llvm_mode -resource-dir /builds/worker/fetches/clang/lib/clang/16 -D _FORTIFY_SOURCE=2 -D AFL_PATH=\"//lib/afl\" -D BIN_PATH=\"//bin\" -D VERSION=\"2.56b\" -D __AFL_HAVE_MANUAL_CONTROL=1 -D __AFL_COMPILER=1 -D FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1 -D "__AFL_LOOP(_A)=({ static volatile char *_B __attribute__((used,unused));  _B = (char*)\"##SIG_AFL_PERSISTENT##\"; __attribute__((visibility(\"default\"))) int _L(unsigned int) __asm__(\"__afl_persistent_loop\"); _L(_A); })" -D "__AFL_INIT()=do { static volatile char *_A __attribute__((used,unused));  _A = (char*)\"##SIG_AFL_DEFER_FORKSRV##\"; __attribute__((visibility(\"default\"))) void _I(void) __asm__(\"__afl_manual_init\"); _I(); } while (0)" -internal-isystem /builds/worker/fetches/clang/lib/clang/16/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -Wall -Wno-pointer-sign -fdebug-compilation-dir=/builds/worker/fetches/AFL/llvm_mode -ferror-limit 19 -funroll-loops -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -fpass-plugin=../afl-llvm-pass.so -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/test-instr-43a1ac.o -x c ../test-instr.c
[task 2022-12-06T00:01:35.147Z] 1.	<eof> parser at end of file
[task 2022-12-06T00:01:35.147Z] 2.	Optimizer
[task 2022-12-06T00:01:35.270Z]  #0 0x00007f2db0674203 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/builds/worker/fetches/clang/bin/../lib/libLLVM-16git.so+0x7b4203)
[task 2022-12-06T00:01:35.270Z]  #1 0x00007f2db067450b SignalHandler(int) Signals.cpp:0:0
[task 2022-12-06T00:01:35.270Z]  #2 0x00007f2db716e140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
[task 2022-12-06T00:01:35.270Z]  #3 0x00007f2db197da4e llvm::GlobalVariable::GlobalVariable(llvm::Module&, llvm::Type*, bool, llvm::GlobalValue::LinkageTypes, llvm::Constant*, llvm::Twine const&, llvm::GlobalVariable*, llvm::GlobalValue::ThreadLocalMode, std::optional<unsigned int>, bool) (/builds/worker/fetches/clang/bin/../lib/libLLVM-16git.so+0x1abda4e)
[task 2022-12-06T00:01:35.270Z]  #4 0x00007f2dada31835 (anonymous namespace)::AFLCoverage::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /builds/worker/fetches/AFL/llvm_mode/afl-llvm-pass.so.cc:122:11
[task 2022-12-06T00:01:35.270Z]  #5 0x00007f2dada31835 llvm::detail::PassModel<llvm::Module, (anonymous namespace)::AFLCoverage, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /builds/worker/fetches/clang/include/llvm/IR/PassManagerInternal.h:88:17
[task 2022-12-06T00:01:35.270Z]  #6 0x00007f2db19a62b9 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/builds/worker/fetches/clang/bin/../lib/libLLVM-16git.so+0x1ae62b9)
[task 2022-12-06T00:01:35.270Z]  #7 0x00007f2db614bb3f (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) BackendUtil.cpp:0:0
[task 2022-12-06T00:01:35.270Z]  #8 0x00007f2db614653e clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/builds/worker/fetches/clang/bin/../lib/libclang-cpp.so.16git+0x246153e)
[task 2022-12-06T00:01:35.270Z]  #9 0x00007f2db623cf64 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) crtstuff.c:0:0
[task 2022-12-06T00:01:35.270Z] #10 0x00007f2db5e69890 clang::ParseAST(clang::Sema&, bool, bool) (/builds/worker/fetches/clang/bin/../lib/libclang-cpp.so.16git+0x2184890)
[task 2022-12-06T00:01:35.270Z] #11 0x00007f2db64b831c clang::FrontendAction::Execute() (/builds/worker/fetches/clang/bin/../lib/libclang-cpp.so.16git+0x27d331c)
[task 2022-12-06T00:01:35.270Z] #12 0x00007f2db6453f24 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/builds/worker/fetches/clang/bin/../lib/libclang-cpp.so.16git+0x276ef24)
[task 2022-12-06T00:01:35.270Z] #13 0x00007f2db64d600a clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/builds/worker/fetches/clang/bin/../lib/libclang-cpp.so.16git+0x27f100a)
[task 2022-12-06T00:01:35.270Z] #14 0x000056289918b14e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/builds/worker/fetches/clang/bin/clang-16+0x1514e)
[task 2022-12-06T00:01:35.270Z] #15 0x0000562899189472 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
[task 2022-12-06T00:01:35.270Z] #16 0x0000562899187d38 clang_main(int, char**) (/builds/worker/fetches/clang/bin/clang-16+0x11d38)
[task 2022-12-06T00:01:35.270Z] #17 0x00007f2daf9f4d0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
[task 2022-12-06T00:01:35.270Z] #18 0x00005628991855a9 _start (/builds/worker/fetches/clang/bin/clang-16+0xf5a9)
[task 2022-12-06T00:01:35.285Z] clang-16: error: unable to execute command: Segmentation fault (core dumped)
[task 2022-12-06T00:01:35.285Z] clang-16: error: clang frontend command failed due to signal (use -v to see invocation)

clang is built using the sysroot, and not using the sysroot to build the
afl-llvm-pass plugin can lead to ABI differences that lead to crashes.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/5dc08fd3ddc0 Use sysroot when building AFL instrumentation toolchain. r=decoder
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: