OSS-FUZZ: Support different architectures and engines

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2026-06-12 21:08:45 +01:00
1 parent 46e34175b8
commit 4c3f4af1c0
6 files changed
+9 -7

No files matched your search

+4 -2
View File
@@ -240,9 +240,11 @@ WARNING_CFLAGS="\
-Wwrite-strings \
"
CC_BASE_NAME=`basename $CC`
# check whether or not the compiler supports -Wlogical-op (clang does not...)
# Note oss-fuzz uses clang and adds in option -Wno-error=unknown-warning-option which overrides -Werror
if test "x$CC" != "xclang"; then
# Note oss-fuzz uses clang / afl and adds in option -Wno-error=unknown-warning-option which overrides -Werror
if test "x$CC_BASE_NAME" != "xclang" -a "x$CC_BASE_NAME" != "xafl-clang-fast" ; then
AX_CHECK_COMPILE_FLAG([-Wlogical-op], [WARNING_CFLAGS="$WARNING_CFLAGS -Wlogical-op"],,[-Werror])
fi
AX_CHECK_COMPILE_FLAG([-fdiagnostics-color], [CFLAGS="$CFLAGS -fdiagnostics-color"],,[-Werror])
+1 -1
View File
@@ -13,7 +13,7 @@ OUT?=.
libcoap?=libcoap-@LIBCOAP_NAME_SUFFIX@
WARNING_CFLAGS?=@WARNING_CFLAGS@
DTLS_CFLAGS?=@DTLS_CFLAGS@
DTLS_LIBS?=@DTLS_LIBS@
DTLS_LIBS?=-Wl,-Bstatic @DTLS_LIBS@ -Wl,-Bdynamic
CPPFLAGS=-I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)
CFLAGS+=$(WARNING_CFLAGS) $(DTLS_CFLAGS) -std=c99
CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
+1 -1
View File
@@ -3,7 +3,7 @@
top_builddir=../..
top_srcdir=../..
LDLIBS+=-lFuzzingEngine
LDLIBS+=$(LIB_FUZZING_ENGINE)
export LDLIBS
.PHONY: oss-fuzz clean
+1 -1
View File
@@ -7,7 +7,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
coap_startup();
pdu = coap_pdu_init(0, 0, 0, size);
if (pdu) {
coap_set_log_level(COAP_LOG_ERR);
coap_set_log_level(COAP_LOG_EMERG);
if (coap_pdu_parse(COAP_PROTO_TCP, data, size, pdu)) {
coap_string_t *query = coap_get_query(pdu);
coap_string_t *uri_path = coap_get_uri_path(pdu);
+1 -1
View File
@@ -7,7 +7,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
coap_startup();
pdu = coap_pdu_init(0, 0, 0, size);
if (pdu) {
coap_set_log_level(COAP_LOG_ERR);
coap_set_log_level(COAP_LOG_EMERG);
if (coap_pdu_parse(COAP_PROTO_UDP, data, size, pdu)) {
coap_string_t *query = coap_get_query(pdu);
coap_string_t *uri_path = coap_get_uri_path(pdu);
+1 -1
View File
@@ -7,7 +7,7 @@ LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
coap_startup();
pdu = coap_pdu_init(0, 0, 0, size);
if (pdu) {
coap_set_log_level(COAP_LOG_ERR);
coap_set_log_level(COAP_LOG_EMERG);
if (coap_pdu_parse(COAP_PROTO_WS, data, size, pdu)) {
coap_string_t *query = coap_get_query(pdu);
coap_string_t *uri_path = coap_get_uri_path(pdu);