0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Merge pull request #3899 from bluca/fuzzers

Problems: address sanitizer not enabled, oss-fuzz images not build-tested
This commit is contained in:
Doron Somech 2020-05-06 09:51:11 +03:00 committed by GitHub
commit d7e58fc880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 8 deletions

View File

@ -88,4 +88,13 @@ jobs:
- name: test
shell: cmd
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

View File

@ -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_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_LDADD = ${TESTUTIL_LIBS} src/libzmq.la
tests_test_diffserv_CPPFLAGS = ${TESTUTIL_CPPFLAGS}
@ -998,7 +994,6 @@ endif
if ON_LINUX
test_apps += tests/test_abstract_ipc \
tests/test_many_sockets \
tests/test_socks
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_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
if HAVE_VMCI

View File

@ -159,8 +159,8 @@ AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes
[ZMQ_ASAN="$enableval"])
if test "x${ZMQ_ASAN}" = "xyes"; then
CFLAGS="${CFLAGS} -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all"
CXXFLAGS="${CXXFLAGS} -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 -fsanitize=leak -fno-sanitize-recover=all"
AM_CONDITIONAL(ENABLE_ASAN, true)
AC_MSG_RESULT([yes])