Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate project njs with target njs_process_script_fuzzer #952

Closed
wants to merge 5 commits into from

Conversation

Vaush
Copy link
Contributor

@Vaush Vaush commented Nov 13, 2020

No description provided.

@google-cla google-cla bot added the cla: yes label Nov 13, 2020
Copy link
Collaborator

@inferno-chromium inferno-chromium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many fuzzer failures, please check the failures

#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1135: multiple definition of `__sanitizer_cov_trace_cmp4'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1135: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__cmplog_ins_hook8':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1156: multiple definition of `__sanitizer_cov_trace_cmp8'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1156: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__cmplog_ins_hook1':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1091: multiple definition of `__sanitizer_cov_trace_const_cmp1'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1091: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__cmplog_ins_hook2':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1114: multiple definition of `__sanitizer_cov_trace_const_cmp2'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1114: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__cmplog_ins_hook4':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1135: multiple definition of `__sanitizer_cov_trace_const_cmp4'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1135: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__cmplog_ins_hook8':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1156: multiple definition of `__sanitizer_cov_trace_const_cmp8'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1156: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__sanitizer_cov_trace_pc_guard':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1027: multiple definition of `__sanitizer_cov_trace_pc_guard'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1027: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__sanitizer_cov_trace_pc_guard_init':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1042: multiple definition of `__sanitizer_cov_trace_pc_guard_init'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1042: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `__sanitizer_cov_trace_switch':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:1205: multiple definition of `__sanitizer_cov_trace_switch'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:1205: first defined here
#16 279.0 /afl/afl-compiler-rt.o: In function `send_forkserver_error':
#16 279.0 llvm_mode/instrumentation/afl-compiler-rt.o.c:141: multiple definition of `send_forkserver_error'
#16 279.0 /afl/afl-compiler-rt.o:llvm_mode/instrumentation/afl-compiler-rt.o.c:141: first defined here
#16 279.0 clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

@Vaush
Copy link
Contributor Author

Vaush commented Nov 17, 2020

@inferno-chromium
So, the build.sh tries to compile pcre as a dependence, statically. For some reason unkown to me right now, that makes it so that afl-clang-fast finds multiple definitions of afl related symbols.
I am trying to understand what's happening, but anyway the issue is for aflplusplus, all the failing checks are for fuzzers that call aflplusplus with different parameters.
@jonathanmetzman encountered a similar problem (although in that case it was missing symbols, not duplicates) in #110.

I tested manually changing the compiler to normal clang instead of afl-clang-fast and pcre does compile, so that might be the problem? But I am not sure if compiling pcre with only clang could lead to issues.
I did notice that the compiler for the afl fuzzer is clang though, not afl-clang-fast, is that normal?

Summarizing:
-PCRE compilation is the current problem, and only in aflplusplus and related fuzzers
-PCRE is compiled with afl-clang-fast and doesn't build, but compiling it with clang works
-Even after completing the build, the test case crashes making the test-run fail, and I don't know why yet, might be related to compiling PCRE with clang.

@inferno-chromium
Copy link
Collaborator

Not fixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants