Commit Graph

7937 Commits

Author SHA1 Message Date
Luca Boccassi
cdd9e9d1f4 Problem: Travis uses old-old-old-stable Ubuntu by default
Solution: set default to bionic, and leave a few jobs that manually
set Trusty/Xenial to have more coverage
This is especially useful to get newer gcc for address sanitizer support
2020-05-05 11:48:55 +01:00
Luca Boccassi
96d3cb39e4 Problem: fuzz input which causes extra-large message allocation not stored
Solution: add it
2020-05-05 11:48:11 +01:00
Luca Boccassi
9ab3fbeee2 Problem: we want to have multiple seed corpora per fuzzer binary
Solution: store them each as a single line in the text file and convert them
at install time
2020-05-05 11:48:11 +01:00
Luca Boccassi
c4fd6dfea7 Problem: sanitizer tests cannot allocate much memory
Solution: restrict maximum message size to 64MB in tests
2020-05-05 11:42:06 +01:00
Luca Boccassi
7df845fb82 Problem: memory sanitizer detects uninitialised global variable usage
Solution: revert "Problem: complexity of start_connecting"

https://travis-ci.org/github/google/oss-fuzz/jobs/680325364

This reverts commit c590873ff7.

Conflicts:
	src/session_base.cpp
	src/session_base.hpp
2020-05-04 22:02:04 +01:00
Doron Somech
309d1f1cb7
Merge pull request #3894 from bluca/fuzzers
Problems: sub/cancel broken with CURVE, fuzzers need corpora and better unit testing
2020-05-04 14:43:47 +03:00
Luca Boccassi
6b259224ee Problem: fuzzer regression tests do very little
Solution: run them with the seed corpora
2020-05-04 11:42:22 +01:00
Luca Boccassi
c8e62cb2e0 Problem: no dictionaries and seed corpora for fuzzers
Solution: add them and install them where oss-fuzz expects them
2020-05-04 02:11:15 +01:00
Luca Boccassi
60ccf54fa6 Problem: sub/cancel broken with CURVE
Solution: handle downgrading sub/cancel messages in CURVE engine
2020-05-03 17:42:53 +01:00
Luca Boccassi
534580c31d
Merge pull request #3893 from gummif/gfa/blob-ref
Problem: extra blob copy
2020-05-02 14:26:06 +01:00
Luca Boccassi
103e39bd6f
Merge pull request #3892 from gummif/gfa/poller-event
Problem: unnecessary event struct and UB
2020-05-01 23:42:32 +01:00
Gudmundur Adalsteinsson
47a080aac0 Problem: extra blob copy
Solution: use reference tag
2020-05-01 22:27:44 +00:00
Gudmundur Adalsteinsson
284d90a436 Problem: unnecessary event struct and UB
Solution: simply use zmq_poller_event_t
2020-05-01 22:12:30 +00:00
Constantin Rack
e05fe370fe
Merge pull request #3890 from gummif/gfa/retfd
Problem: -1 used for invalid socket
2020-04-29 17:23:10 +00:00
Gudmundur Adalsteinsson
e18772f942 Problem: -1 used for invalid socket
Solution: use retired_fd instead
2020-04-29 17:12:08 +00:00
Luca Boccassi
aa29f7caff
Merge pull request #3889 from bluca/fuzzers
Problem: testutil build broken with gcc 4.4 on CentOS 6
2020-04-28 13:33:03 +01:00
Luca Boccassi
1443c0e787
Merge pull request #3887 from gummif/gfa/unify-fd
Problem: Multiple fd_t definitions
2020-04-28 13:32:52 +01:00
Luca Boccassi
5867d7cf5f
Merge pull request #3888 from gummif/gfa/poller-fd
Problem: Poller event fd unspecified
2020-04-28 11:26:58 +01:00
Gudmundur Adalsteinsson
d426f2ab0c Problem: Multiple fd_t definitions
Solution: Unify definition
2020-04-28 08:50:18 +00:00
Luca Boccassi
a909e7296d Problem: testutil build broken with gcc 4.4 on CentOS 6
Solution: do not alias sockaddr_un, but take a copy

tests/testutil.cpp: In function 'fd_t bind_socket_resolve_port(const char*, const char*, char*, int, int)':
tests/testutil.cpp:468: error: dereferencing pointer 'un_addr' does break strict-aliasing rules
2020-04-28 00:49:37 +01:00
Luca Boccassi
882cb6fdfb Problem: static analysis shows dead store in testutil
Solution: remove it and rework the ifdefs to be safe against uninitialised use
2020-04-28 00:49:37 +01:00
Luca Boccassi
12a2f81717
Merge pull request #3885 from bluca/fuzzers
Problem: no fuzz testing
2020-04-27 23:21:50 +01:00
Gudmundur Adalsteinsson
bf22a9f3e9 Problem: Poller event fd unspecified
Solution: Specify an invalid file descriptor for socket events
2020-04-27 21:00:45 +00:00
Luca Boccassi
96787c35f8 Problem: no fuzz testing for API with variable input
Solution: add tests for zmq_bind, zmq_connect and zmq_z85_decode
2020-04-27 01:18:45 +01:00
Luca Boccassi
57df836381 Problem: no fuzz testing for CURVE
Solution: add simple, initial tests for client and server
2020-04-27 01:18:31 +01:00
Luca Boccassi
8e774f3cd6 Problem: no integration with fuzz testing
Solution: port the 2 new tests from oss-fuzz, and wire them up to
be ran manually with a static input in normal builds.
Add a specific configure option to use the external fuzzing engine
from oss-fuzz.
2020-04-27 01:18:08 +01:00
Luca Boccassi
c6d3bc68c8 Problem: ZMTP mocks duplicated across tests
Solution: define buffers in common header
2020-04-26 21:04:53 +01:00
Luca Boccassi
4f35d1af1a Problem: using BSD sockets in test is duplicated across many tests
Solution: refactor in testutil.lib, so that they can be used for fuzzers too
2020-04-26 17:59:26 +01:00
Luca Boccassi
c81a973cd8 Problem: assert macros not detecting errors from syscall that do not return -1 on failure
Solution: add a new TEST_ASSERT_SUCCESS_RAW_ZERO_ERRNO macro so that
it can check explicitly for non-zero values. This will be used
for getaddrinfo().
2020-04-26 17:59:26 +01:00
Luca Boccassi
727637082f Problem: test_shutdown_stress_tipc fails sometimes
Solution: create socket in the same thread where it is used
2020-04-26 15:08:04 +01:00
Luca Boccassi
b56195e995
Merge pull request #3882 from laplaceyang/relicense
RELICENSE: Grant from laplaceyang.
2020-04-22 10:16:42 +01:00
laplaceyang
491defdf12 RELICENSE: Grant from laplaceyang. 2020-04-22 17:11:58 +08:00
Luca Boccassi
9984d43143
Merge pull request #3879 from somdoron/master
problem: appveyor is very slow
2020-04-20 21:20:21 +01:00
Doron Somech
81056a7237 problem: appveyor is very slow
Solution: move to github actions
2020-04-20 22:55:28 +03:00
Luca Boccassi
a525323757
Merge pull request #3878 from Eelis/master
Problem: out-of-bounds array access in socket_poller::check_events.
2020-04-20 12:50:41 +01:00
Luca Boccassi
f00f464566
Merge pull request #3866 from gummif/gfa/poller-refactoring
Problem: poller item lookup can be simplified
2020-04-20 09:34:57 +01:00
Eelis van der Weegen
063f14a940 Problem: out-of-bounds array access in socket_poller::check_events. 2020-04-20 03:22:31 +02:00
Gudmundur Adalsteinsson
0b32fb3629 Problem: poller item lookup can be simplified
Solution: Extract generic find function
2020-04-19 20:53:56 +00:00
Luca Boccassi
d882e807dd
Merge pull request #3876 from somdoron/HELLO_MSG
problem: checking the wrong socket when sending hello msg
2020-04-18 23:32:31 +01:00
Luca Boccassi
08d94d0e16
Merge pull request #3877 from gummif/gfa/spinlock-fix
Problem: Spinning on atomics can cause hangs
2020-04-18 22:21:47 +01:00
Doron Somech
6ca07a30e3 problem: checking the wrong socket when sending hello msg 2020-04-18 22:45:49 +03:00
Doron Somech
2745ac31d7
Merge pull request #3875 from bluca/test
Fix coverage job and appveyor job
2020-04-18 20:25:17 +03:00
Gudmundur Adalsteinsson
ff80089939 Problem: Spinning on atomics can cause hangs
Solution: Add a sleep in the loop. Some versions of
valgrind may hang when spinning on atomic variables.
2020-04-18 12:44:59 +00:00
Luca Boccassi
5a78bad2a8 Problem: coverage CI job fails
Solution: bump OS to Xenial for newer python libraries
2020-04-18 11:06:58 +01:00
Luca Boccassi
7cac73401a Problem: test_many_sockets always fails on Windows
Solution: don't run it
2020-04-18 11:03:15 +01:00
Luca Boccassi
ada6f0c058
Merge pull request #3871 from somdoron/DISCONNECT_MSG
problem: router doesn't know when peer disconnected
2020-04-18 10:49:50 +01:00
Luca Boccassi
7ce7b8b888
Merge pull request #3874 from shgalym/patch-1
typo fix root README
2020-04-18 10:48:07 +01:00
Galymzhàn Sh
d0b5713709
typo fix root README 2020-04-18 15:24:14 +06:00
Luca Boccassi
97a52af242
Merge pull request #3872 from gummif/gfa/poller-size
Problem: No support to query poller size
2020-04-17 22:50:34 +01:00
Gudmundur Adalsteinsson
9c6738bb45 Problem: No support to query poller size
Solution: Add zmq_poller_size that queries the number
of objects registered, allowing safer usages of poller
to avoid livelock situations.
2020-04-17 18:37:01 +00:00