mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-14 02:57:47 +01:00
Merge pull request #3899 from bluca/fuzzers
Problems: address sanitizer not enabled, oss-fuzz images not build-tested
This commit is contained in:
commit
d7e58fc880
11
.github/workflows/CI.yaml
vendored
11
.github/workflows/CI.yaml
vendored
@ -88,4 +88,13 @@ jobs:
|
|||||||
- name: test
|
- name: test
|
||||||
shell: cmd
|
shell: cmd
|
||||||
working-directory: build_libzmq
|
working-directory: build_libzmq
|
||||||
run: ctest -C "%Configuration%"
|
run: ctest -C "%Configuration%"
|
||||||
|
Fuzzing:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Build Fuzzers
|
||||||
|
id: build
|
||||||
|
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||||
|
with:
|
||||||
|
oss-fuzz-project-name: 'libzmq'
|
||||||
|
dry-run: false
|
||||||
|
14
Makefile.am
14
Makefile.am
@ -736,10 +736,6 @@ tests_test_getsockopt_memset_SOURCES = tests/test_getsockopt_memset.cpp
|
|||||||
tests_test_getsockopt_memset_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
tests_test_getsockopt_memset_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
||||||
tests_test_getsockopt_memset_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
tests_test_getsockopt_memset_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
||||||
|
|
||||||
tests_test_many_sockets_SOURCES = tests/test_many_sockets.cpp
|
|
||||||
tests_test_many_sockets_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
|
||||||
tests_test_many_sockets_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
|
||||||
|
|
||||||
tests_test_diffserv_SOURCES = tests/test_diffserv.cpp
|
tests_test_diffserv_SOURCES = tests/test_diffserv.cpp
|
||||||
tests_test_diffserv_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
tests_test_diffserv_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
||||||
tests_test_diffserv_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
tests_test_diffserv_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
||||||
@ -998,7 +994,6 @@ endif
|
|||||||
|
|
||||||
if ON_LINUX
|
if ON_LINUX
|
||||||
test_apps += tests/test_abstract_ipc \
|
test_apps += tests/test_abstract_ipc \
|
||||||
tests/test_many_sockets \
|
|
||||||
tests/test_socks
|
tests/test_socks
|
||||||
|
|
||||||
tests_test_abstract_ipc_SOURCES = tests/test_abstract_ipc.cpp
|
tests_test_abstract_ipc_SOURCES = tests/test_abstract_ipc.cpp
|
||||||
@ -1009,6 +1004,15 @@ tests_test_socks_SOURCES = tests/test_socks.cpp
|
|||||||
tests_test_socks_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
tests_test_socks_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
||||||
tests_test_socks_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
tests_test_socks_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
||||||
|
|
||||||
|
# TODO: enable when https://github.com/zeromq/libzmq/issues/3898 is fixed
|
||||||
|
if !ENABLE_ASAN
|
||||||
|
test_apps += tests/test_many_sockets
|
||||||
|
|
||||||
|
tests_test_many_sockets_SOURCES = tests/test_many_sockets.cpp
|
||||||
|
tests_test_many_sockets_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
|
||||||
|
tests_test_many_sockets_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_VMCI
|
if HAVE_VMCI
|
||||||
|
@ -159,8 +159,8 @@ AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes
|
|||||||
[ZMQ_ASAN="$enableval"])
|
[ZMQ_ASAN="$enableval"])
|
||||||
|
|
||||||
if test "x${ZMQ_ASAN}" = "xyes"; then
|
if test "x${ZMQ_ASAN}" = "xyes"; then
|
||||||
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
|
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-sanitize-recover=all"
|
||||||
CXXFLAGS="${CXXFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
|
CXXFLAGS="${CXXFLAGS} -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-sanitize-recover=all"
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_ASAN, true)
|
AM_CONDITIONAL(ENABLE_ASAN, true)
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
|
Loading…
Reference in New Issue
Block a user