diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index e21216bd..b33e4250 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -88,4 +88,13 @@ jobs: - name: test shell: cmd working-directory: build_libzmq - run: ctest -C "%Configuration%" \ No newline at end of file + 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 diff --git a/Makefile.am b/Makefile.am index b01dc02d..9f3ccc30 100755 --- a/Makefile.am +++ b/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_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 diff --git a/configure.ac b/configure.ac index e0132b15..1ea7ee2b 100644 --- a/configure.ac +++ b/configure.ac @@ -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])