I got error when running setup.sh
script. I'm on ubuntu 20.04 with clang 12
Here is the log
/usr/bin/ld: gramfuzz-helpers.o:(.bss+0x4): multiple definition of `curr_state'; gramfuzz.o:(.bss+0x8): first defined here
/usr/bin/ld: gramfuzz-helpers.o:(.bss+0x8): multiple definition of `final_state'; gramfuzz.o:(.bss+0xc): first defined here
/usr/bin/ld: gramfuzz-helpers.o:(.bss+0x0): multiple definition of `init_state'; gramfuzz.o:(.bss+0x4): first defined here
/usr/bin/ld: gramfuzz-helpers.o:(.bss+0xc): multiple definition of `numstates'; gramfuzz.o:(.bss+0x0): first defined here
/usr/bin/ld: gramfuzz-helpers.o:(.bss+0x10): multiple definition of `potential'; gramfuzz.o:(.bss+0x10): first defined here
/usr/bin/ld: gramfuzz-mutators.o:(.bss+0x0): multiple definition of `curr_state'; gramfuzz.o:(.bss+0x8): first defined here
/usr/bin/ld: gramfuzz-mutators.o:(.bss+0xc): multiple definition of `final_state'; gramfuzz.o:(.bss+0xc): first defined here
/usr/bin/ld: gramfuzz-mutators.o:(.bss+0x8): multiple definition of `init_state'; gramfuzz.o:(.bss+0x4): first defined here
/usr/bin/ld: gramfuzz-mutators.o:(.bss+0x4): multiple definition of `numstates'; gramfuzz.o:(.bss+0x0): first defined here
/usr/bin/ld: gramfuzz-mutators.o:(.bss+0x10): multiple definition of `potential'; gramfuzz.o:(.bss+0x10): first defined here
/usr/bin/ld: gramfuzz-util.o:(.bss+0x4): multiple definition of `curr_state'; gramfuzz.o:(.bss+0x8): first defined here
/usr/bin/ld: gramfuzz-util.o:(.bss+0x8): multiple definition of `final_state'; gramfuzz.o:(.bss+0xc): first defined here
/usr/bin/ld: gramfuzz-util.o:(.bss+0x0): multiple definition of `init_state'; gramfuzz.o:(.bss+0x4): first defined here
/usr/bin/ld: gramfuzz-util.o:(.bss+0xc): multiple definition of `numstates'; gramfuzz.o:(.bss+0x0): first defined here
/usr/bin/ld: gramfuzz-util.o:(.bss+0x10): multiple definition of `potential'; gramfuzz.o:(.bss+0x10): first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [GNUmakefile:19: gramfuzz-mutator.so] Error 1
src/afl-fuzz-init.c:827:16: warning: variable 'nfn_aut_orig' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (src_id-- && s) {
^~~~~~~~~~~~~
src/afl-fuzz-init.c:876:18: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~~~~~~
src/afl-fuzz-init.c:827:16: note: remove the condition if it is always true
while (src_id-- && s) {
^~~~~~~~~~~~~
1
src/afl-fuzz-init.c:827:16: warning: variable 'nfn_aut_orig' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
while (src_id-- && s) {
^~~~~~~~
src/afl-fuzz-init.c:876:18: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~~~~~~
src/afl-fuzz-init.c:827:16: note: remove the '&&' if its condition is always true
while (src_id-- && s) {
^~~~~~~~~~~
src/afl-fuzz-init.c:824:11: warning: variable 'nfn_aut_orig' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/afl-fuzz-init.c:876:18: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~~~~~~
src/afl-fuzz-init.c:824:7: note: remove the 'if' if its condition is always true
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/afl-fuzz-init.c:824:11: warning: variable 'nfn_aut_orig' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~
src/afl-fuzz-init.c:876:18: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~~~~~~
src/afl-fuzz-init.c:824:11: note: remove the '&&' if its condition is always true
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~~~~
src/afl-fuzz-init.c:793:37: note: initialize the variable 'nfn_aut_orig' to silence this warning
u8 *nfn, *nfn_aut, *nfn_aut_orig, *rsl = strrchr(q->fname, '/');
^
= NULL
src/afl-fuzz-init.c:827:16: warning: variable 'nfn_aut' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (src_id-- && s) {
^~~~~~~~~~~~~
src/afl-fuzz-init.c:876:32: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~
src/afl-fuzz-init.c:827:16: note: remove the condition if it is always true
while (src_id-- && s) {
^~~~~~~~~~~~~
1
src/afl-fuzz-init.c:827:16: warning: variable 'nfn_aut' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
while (src_id-- && s) {
^~~~~~~~
src/afl-fuzz-init.c:876:32: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~
src/afl-fuzz-init.c:827:16: note: remove the '&&' if its condition is always true
while (src_id-- && s) {
^~~~~~~~~~~
src/afl-fuzz-init.c:824:11: warning: variable 'nfn_aut' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/afl-fuzz-init.c:876:32: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~
src/afl-fuzz-init.c:824:7: note: remove the 'if' if its condition is always true
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/afl-fuzz-init.c:824:11: warning: variable 'nfn_aut' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~
src/afl-fuzz-init.c:876:32: note: uninitialized use occurs here
link_or_copy(nfn_aut_orig, nfn_aut);
^~~~~~~
src/afl-fuzz-init.c:824:11: note: remove the '&&' if its condition is always true
if (src_str && sscanf(src_str + 1, "%06u", &src_id) == 1) {
^~~~~~~~~~
src/afl-fuzz-init.c:793:22: note: initialize the variable 'nfn_aut' to silence this warning
u8 *nfn, *nfn_aut, *nfn_aut_orig, *rsl = strrchr(q->fname, '/');
^
= NULL
src/afl-fuzz-init.c:2435:23: warning: unused variable 'ii2' [-Wunused-variable]
int arraylen, ii, ii2, trigger_len, error;
^
src/afl-fuzz-init.c:2435:9: warning: unused variable 'arraylen' [-Wunused-variable]
int arraylen, ii, ii2, trigger_len, error;
^
src/afl-fuzz-init.c:2435:41: warning: unused variable 'error' [-Wunused-variable]
int arraylen, ii, ii2, trigger_len, error;
^
src/afl-fuzz-init.c:2461:20: warning: unused variable 'type' [-Wunused-variable]
enum json_type type;
^
12 warnings generated.
/usr/bin/ld: /tmp/afl-fuzz-queue-6039a0.o (symbol from plugin): in function `mark_as_det_done':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-queue-6039a0.o (symbol from plugin): in function `mark_as_det_done':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-queue-6039a0.o (symbol from plugin): in function `mark_as_det_done':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-queue-6039a0.o (symbol from plugin): in function `mark_as_det_done':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-queue-6039a0.o (symbol from plugin): in function `mark_as_det_done':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-cmplog-ac8f72.o (symbol from plugin): in function `cmplog_exec_child':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-cmplog-ac8f72.o (symbol from plugin): in function `cmplog_exec_child':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-cmplog-ac8f72.o (symbol from plugin): in function `cmplog_exec_child':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-cmplog-ac8f72.o (symbol from plugin): in function `cmplog_exec_child':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-cmplog-ac8f72.o (symbol from plugin): in function `cmplog_exec_child':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-one-dee6ed.o (symbol from plugin): in function `fuzz_one_original':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-one-dee6ed.o (symbol from plugin): in function `fuzz_one_original':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-one-dee6ed.o (symbol from plugin): in function `fuzz_one_original':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-one-dee6ed.o (symbol from plugin): in function `fuzz_one_original':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-one-dee6ed.o (symbol from plugin): in function `fuzz_one_original':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-python-e8ab8c.o (symbol from plugin): in function `finalize_py_module':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-python-e8ab8c.o (symbol from plugin): in function `finalize_py_module':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-python-e8ab8c.o (symbol from plugin): in function `finalize_py_module':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-python-e8ab8c.o (symbol from plugin): in function `finalize_py_module':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-python-e8ab8c.o (symbol from plugin): in function `finalize_py_module':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-mutators-69a20c.o (symbol from plugin): in function `setup_custom_mutators':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-mutators-69a20c.o (symbol from plugin): in function `setup_custom_mutators':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-mutators-69a20c.o (symbol from plugin): in function `setup_custom_mutators':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-mutators-69a20c.o (symbol from plugin): in function `setup_custom_mutators':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-mutators-69a20c.o (symbol from plugin): in function `setup_custom_mutators':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-stats-f6d207.o (symbol from plugin): in function `write_stats_file':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-stats-f6d207.o (symbol from plugin): in function `write_stats_file':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-stats-f6d207.o (symbol from plugin): in function `write_stats_file':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-stats-f6d207.o (symbol from plugin): in function `write_stats_file':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-stats-f6d207.o (symbol from plugin): in function `write_stats_file':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-state-2a3b9a.o (symbol from plugin): in function `afl_state_init':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-state-2a3b9a.o (symbol from plugin): in function `afl_state_init':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-state-2a3b9a.o (symbol from plugin): in function `afl_state_init':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-state-2a3b9a.o (symbol from plugin): in function `afl_state_init':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-state-2a3b9a.o (symbol from plugin): in function `afl_state_init':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-redqueen-d69bc7.o (symbol from plugin): in function `input_to_state_stage':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-redqueen-d69bc7.o (symbol from plugin): in function `input_to_state_stage':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-redqueen-d69bc7.o (symbol from plugin): in function `input_to_state_stage':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-redqueen-d69bc7.o (symbol from plugin): in function `input_to_state_stage':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-redqueen-d69bc7.o (symbol from plugin): in function `input_to_state_stage':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-init-9af367.o (symbol from plugin): in function `bind_to_free_cpu':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-init-9af367.o (symbol from plugin): in function `bind_to_free_cpu':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-init-9af367.o (symbol from plugin): in function `bind_to_free_cpu':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-init-9af367.o (symbol from plugin): in function `bind_to_free_cpu':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-init-9af367.o (symbol from plugin): in function `bind_to_free_cpu':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-fc19f1.o (symbol from plugin): in function `main':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-fc19f1.o (symbol from plugin): in function `main':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-fc19f1.o (symbol from plugin): in function `main':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-fc19f1.o (symbol from plugin): in function `main':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-fc19f1.o (symbol from plugin): in function `main':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-bitmap-6e8318.o (symbol from plugin): in function `write_bitmap':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-bitmap-6e8318.o (symbol from plugin): in function `write_bitmap':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-bitmap-6e8318.o (symbol from plugin): in function `write_bitmap':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-bitmap-6e8318.o (symbol from plugin): in function `write_bitmap':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-bitmap-6e8318.o (symbol from plugin): in function `write_bitmap':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-run-a32deb.o (symbol from plugin): in function `fuzz_run_target':
(.text+0x0): multiple definition of `init_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-run-a32deb.o (symbol from plugin): in function `fuzz_run_target':
(.text+0x0): multiple definition of `curr_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-run-a32deb.o (symbol from plugin): in function `fuzz_run_target':
(.text+0x0): multiple definition of `final_state'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-run-a32deb.o (symbol from plugin): in function `fuzz_run_target':
(.text+0x0): multiple definition of `numstates'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: /tmp/afl-fuzz-run-a32deb.o (symbol from plugin): in function `fuzz_run_target':
(.text+0x0): multiple definition of `potential'; /tmp/afl-fuzz-extras-1ec72d.o (symbol from plugin):(.text+0x0): first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [GNUmakefile:387: afl-fuzz] Error 1
GNUmakefile:56: llvm_mode only supports llvm versions 3.4 up to 11
gramfuzz-util.c:116:12: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
strcpy(unparsed, term_ptr->symbol);
^~~~~~~~
/usr/include/string.h:122:39: note: passing argument to parameter '__dest' here
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
^
gramfuzz-util.c:120:16: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
strcat(unparsed, term_ptr->symbol);
^~~~~~~~
/usr/include/string.h:130:39: note: passing argument to parameter '__dest' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
^
gramfuzz-util.c:130:17: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
if (access (fn, F_OK) != -1) {
^~
/usr/include/unistd.h:287:32: note: passing argument to parameter '__name' here
extern int access (const char *__name, int __type) __THROW __nonnull ((1));
^
gramfuzz-util.c:134:16: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
fp = fopen(fn, "wbx+");
^~
/usr/include/stdio.h:246:44: note: passing argument to parameter '__filename' here
extern FILE *fopen (const char *__restrict __filename,
^
gramfuzz-util.c:160:16: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
fp = fopen(fn, "rb");
^~
/usr/include/stdio.h:246:44: note: passing argument to parameter '__filename' here
extern FILE *fopen (const char *__restrict __filename,
^
5 warnings generated.
test.c:14:41: warning: passing 'u8 *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
parsed_json = json_object_from_file(automaton_file);
^~~~~~~~~~~~~~
/usr/local/include/json-c/json_util.h:43:67: note: passing argument to parameter 'filename' here
JSON_EXPORT struct json_object* json_object_from_file(const char *filename);
^
test.c:86:29: warning: passing 'char *' to parameter of type 'u8 *' (aka 'unsigned char *') converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
state* pda = create_pda(automaton_path);
^~~~~~~~~~~~~~
test.c:6:23: note: passing argument to parameter 'automaton_file' here
state *create_pda(u8* automaton_file) {
^
2 warnings generated.
/usr/bin/ld: /tmp/gramfuzz-mutators-064c8c.o:(.bss+0x0): multiple definition of `curr_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x4): first defined here
/usr/bin/ld: /tmp/gramfuzz-mutators-064c8c.o:(.bss+0xc): multiple definition of `final_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x8): first defined here
/usr/bin/ld: /tmp/gramfuzz-mutators-064c8c.o:(.bss+0x8): multiple definition of `init_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/gramfuzz-mutators-064c8c.o:(.bss+0x4): multiple definition of `numstates'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0xc): first defined here
/usr/bin/ld: /tmp/gramfuzz-mutators-064c8c.o:(.bss+0x10): multiple definition of `potential'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x10): first defined here
/usr/bin/ld: /tmp/gramfuzz-util-8a26e8.o:(.bss+0x4): multiple definition of `curr_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x4): first defined here
/usr/bin/ld: /tmp/gramfuzz-util-8a26e8.o:(.bss+0x8): multiple definition of `final_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x8): first defined here
/usr/bin/ld: /tmp/gramfuzz-util-8a26e8.o:(.bss+0x0): multiple definition of `init_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/gramfuzz-util-8a26e8.o:(.bss+0xc): multiple definition of `numstates'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0xc): first defined here
/usr/bin/ld: /tmp/gramfuzz-util-8a26e8.o:(.bss+0x10): multiple definition of `potential'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x10): first defined here
/usr/bin/ld: /tmp/test-b62e22.o:(.bss+0xc): multiple definition of `curr_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x4): first defined here
/usr/bin/ld: /tmp/test-b62e22.o:(.bss+0x0): multiple definition of `final_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x8): first defined here
/usr/bin/ld: /tmp/test-b62e22.o:(.bss+0x4): multiple definition of `init_state'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x0): first defined here
/usr/bin/ld: /tmp/test-b62e22.o:(.bss+0x8): multiple definition of `numstates'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0xc): first defined here
/usr/bin/ld: /tmp/test-b62e22.o:(.bss+0x10): multiple definition of `potential'; /tmp/gramfuzz-helpers-6f952d.o:(.bss+0x10): first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [GNUmakefile:25: test] Error 1