oss-fuzz/infra/base-images/base-builder/jcc
Dongge Liu c36da73074
Remove flags that may escalate warnings to errors (#12116)
Some projects failed to compile because its compilation command
escalates warnings into errors (e.g.,
[`bind9`](https://llm-exp.oss-fuzz.com/Result-reports/scheduled/2024-06-21-weekly-all/benchmark/output-bind9-dns_view_asyncload/index.html)).
This is particularly problematic for C projects because `JCC` assumes
these errors are due to C/C++ compatibility issues and then compiles
these projects with `clang++`, which causes different failures that LLM
cannot fix (e.g., in `bind9`, the error is caused by other files using C
symbols that are not available in C++).

This PR removes all flags that may cause this problem in all compilation
commands.
When tested locally, it fixed the compilation error in `bind9` (with
some manual fix on the fuzz target).

----
Here is the command that contains `-Werror*` and causes this problem in
`bind9`:
```shell
clang -DHAVE_CONFIG_H -I. -I..  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DISC_MEM_DEFAULTFILL=1 -DISC_MEM_TRACKLINES=1 -DISC_LIST_CHECKINIT=1 -DISC_STATS_CHECKUNDERFLOW=1 -DDNS_RBTDB_STRONG_RWLOCK_CHECK=1 -DISC_MUTEX_ERROR_CHECK=1 -include ../config.h -I./include -I../include -I../lib/isc/include -I../lib/isc/include -I../lib/dns/include -I../lib/dns/include -I/usr/include/x86_64-linux-gnu  -DFUZZDIR=\"/src/bind9/fuzz\" -I../lib/dns -I../lib/isc -I../tests/include  -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wno-missing-field-initializers -Wformat -Wshadow -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=format-security -Werror=parentheses -Werror=implicit -Werror=strict-prototypes -Werror=vla -fno-strict-aliasing -fno-delete-null-pointer-checks -fdiagnostics-show-option -Werror -Wno-vla -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -I/usr/include/x86_64-linux-gnu -pthread -MT isc_lex_gettoken.o -MD -MP -MF $depbase.Tpo -c -o isc_lex_gettoken.o isc_lex_gettoken.c
```
2024-06-26 10:44:17 +10:00
..
testdata
build_jcc.bash POC: Speed up compilation by freezing container during compilation. (#11940) 2024-06-17 21:06:12 -04:00
go.mod
jcc.go Remove flags that may escalate warnings to errors (#12116) 2024-06-26 10:44:17 +10:00
jcc2.go POC: Speed up compilation by freezing container during compilation. (#11940) 2024-06-17 21:06:12 -04:00
jcc_test.go