Simon Giesecke
bafd626dff
Problem: coverage build script doesn't recognize several config options
...
Solution: extrace and reuse regular config option setting
2020-09-04 10:58:16 +02:00
Simon Giesecke
74543a921c
Problem: coverage report includes irrelevant files
...
Solution: properly set file filter to only include files in src except tweetnacl
2020-09-04 10:58:16 +02:00
Simon Giesecke
1d62d7c94a
Problem: coverage is not measured with all features
...
Solution: enable all features on coverage build
2020-09-04 10:58:16 +02:00
Luca Boccassi
9c1801554f
Merge pull request #4027 from ffontaine/master
...
configure.ac: fix build with openpgm-5-3-128
2020-09-02 10:33:40 +01:00
Fabrice Fontaine
883d432c29
configure.ac: fix build with openpgm-5-3-128
...
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-09-02 07:54:36 +02:00
Doron Somech
9fe56b175d
Merge pull request #4023 from bluca/fuzzers
...
Problem: setsockopt of CURVE key ignores parameter length
2020-08-23 16:21:27 +03:00
Luca Boccassi
97f8274129
Problem: setsockopt of CURVE key ignores parameter length
...
Solution: create std::string using length to avoid overflow
2020-08-23 13:47:17 +01:00
Luca Boccassi
8cc56d9f0f
Merge pull request #4022 from bluca/fuzzers
...
Problem: test_socket_options_fuzzer does not work
2020-08-22 21:54:46 +01:00
Luca Boccassi
5b0956c381
Problem: test_socket_options_fuzzer does not work
...
Solution: fix it
2020-08-22 17:01:10 +01:00
Luca Boccassi
2fb04c1018
Problem: ZMQ_METADATA setsockopt ignores length and assumes nUL-terminated string
...
Solution: use length too
2020-08-22 17:01:10 +01:00
Doron Somech
241240b79f
Merge pull request #4020 from bluca/fuzz_options
...
Problem: test_socket_options_fuzzer can pass non-NUL terminated data …
2020-08-21 18:38:54 +03:00
Luca Boccassi
6386bc13d3
Problem: test_socket_options_fuzzer can pass non-NUL terminated data buffers
...
Solution: ensure they are valid strings
2020-08-21 16:23:24 +01:00
Doron Somech
36dc251ed0
Merge pull request #4019 from bluca/fuzz_options
...
Problem: zmq_z85_decode doesn't check its input length
2020-08-21 18:08:43 +03:00
Luca Boccassi
b84e164698
Problem: zmq_z85_decode doesn't check its input length
...
Solution: do it
2020-08-21 16:03:57 +01:00
Doron Somech
f447169e82
Merge pull request #4018 from bluca/fuzz_options
...
Problem: no fuzz testing for options
2020-08-21 18:01:24 +03:00
Luca Boccassi
f43013a7d1
Problem: no fuzz testing for options
...
Solution: add it
2020-08-21 15:25:55 +01:00
Doron Somech
eecd796106
Merge pull request #4017 from bluca/news
...
Problems: build broken on Solaris, NEWS out of date
2020-08-21 16:41:40 +03:00
Luca Boccassi
64a575eede
Problem: test_bind_ws_fuzzer needs DRAFT sockets
...
Solution: use ZMQ_DEALER instead
2020-08-21 14:39:08 +01:00
Luca Boccassi
a4dbdb614e
Problem: some platforms do not have strnlen
...
Solution: move compat redefinition to compat.hpp header so that
it can be used from msg.cpp
2020-08-21 14:39:08 +01:00
Luca Boccassi
d40c79cef4
Problem: missing items in NEWS
...
Solution: add them
2020-08-21 14:22:28 +01:00
Doron Somech
700fd13cad
Merge pull request #4016 from bluca/news
...
Problem: NEWS out of date
2020-08-21 14:51:51 +03:00
Luca Boccassi
7f1e219d09
Problem: NEWS out of date
...
Solution: add latest entries
2020-08-21 12:05:39 +01:00
Doron Somech
29f5ede684
Merge pull request #4013 from bluca/fuzzers
...
Problem: ws_engine leaks memory if Sec-WebSocket-Protocol header pass…
2020-08-17 06:53:52 +03:00
Luca Boccassi
b02bdd566a
Problem: ws_engine leaks memory if Sec-WebSocket-Protocol header passed multiple times
...
Solution: ensure it's passed only once
2020-08-16 22:35:42 +01:00
Doron Somech
d280c44fe0
Merge pull request #4011 from bluca/fuzzers
...
Problem: use-after-free in WS
2020-08-15 17:06:58 +03:00
Luca Boccassi
c733067d6d
Problem: use-after-free in WS
...
Solution: bail out of the stream engine out_event if ws_engine raises
an error
2020-08-15 14:31:09 +01:00
Doron Somech
1412078db6
Merge pull request #4010 from bluca/fuzzers
...
Problem: WS might use handshake buffer for data
2020-08-15 14:59:30 +03:00
Luca Boccassi
110551d5df
Problem: formatting errors
...
Solution: apply clang-format-diff
2020-08-15 12:26:14 +01:00
Luca Boccassi
1668432894
Problem: WS might use handshake buffer for data
...
Solution: check for it before reusing it to avoid overflows
2020-08-15 12:25:52 +01:00
Luca Boccassi
87ee106438
Merge pull request #4009 from benjdero/master
...
Problem: libzmq use outdated Android NDK version
2020-08-14 16:57:23 +01:00
Benjamin Deroche
83667099bb
Problem: libzmq use outdated Android NDK version
...
Solution: Update Android NDK version
2020-08-14 16:49:14 +02:00
Stéphane Valès
3da6fde592
Problem : if socket is invalid for any reason, as_socket_base_t() will return NULL and 'as_socket_base_t (items_[i].socket)->is_thread_safe ()' will crash ( #4004 )
...
* Problem : if socket is invalid for any reason, as_socket_base_t() will return NULL and 'as_socket_base_t (items_[i].socket)->is_thread_safe ()' will crash
Solution: expand the code to test the returned value from as_socket_base_t() before calling is_thread_safe() and make zmq_poll() return -1 if as_socket_base_t() returned NULL.
NB: this occurred on the destruction of a SUB socket while running a zloop and without previously calling zloop_reader_set_tolerant and zloop_reader_end. When entering zmq_poll, the PUB socket was already destroyed but still registered in the poll items.
NB: making zmq_poll return -1 is OK as it is what happens anyway, and errno is properly set to ENOTSOCK by as_socket_base_t() when it returns NULL.
Co-authored-by: Stéphane Valès <stephane@vales.fr@users.noreply.github.com>
2020-08-07 09:13:52 +01:00
Luca Boccassi
5d77cd8118
Merge pull request #4005 from stvales/patch-1
...
Create StephaneVales.md
2020-08-07 09:13:23 +01:00
Stéphane Valès
a246b255d3
Create StephaneVales.md
2020-08-07 09:53:40 +02:00
Davit Kalantaryan
0a424486a0
Modifications to compile code for WINDOWS ARM and ARM64 ( #4003 )
...
* Modifications to compile code for WINDOWS ARM and ARM64
[why]
In order to compile ZMQ related software on WINDOWS ARM
[how]
Replaced code in the file clock.cpp around the line 240.
Added intrinsics for ARM to replace '__rdtsc'
[todo]
Find proper tick counter query for ARM64 (see file:clock.cpp,line:~250)
* RELICENSEing
[why]
To make usage of changed code properly usable by libzmq project team
[how]
Added file /RELICENSE/kalantar.md with necessary information
2020-08-06 17:41:15 +01:00
Luca Boccassi
22e37933b3
Merge pull request #3997 from kaczmarj/enh/dockerfile
...
make Docker image smaller + use `debian:buster-slim` base
2020-07-30 00:18:02 +01:00
Jakub Kaczmarzyk
131716c897
add relicense statement for @kaczmarj
2020-07-29 19:11:14 -04:00
Jakub Kaczmarzyk
ddbef32103
make Docker image smaller + use debian:buster-slim
base
...
This commit updates the Dockerfile to use multiple stages. In the first stage, compile-time dependencies are installed, and libzmq is compiled and tested. The second stage starts with a fresh, slim Docker image, and the compiled outputs of the first stage are copied over. Runtime dependencies, like libsodium and kerberos, are installed as well.
2020-07-29 15:39:07 -04:00
Luca Boccassi
7deb8ded43
Merge pull request #3996 from tarmo/xpub-unmatch
...
Problem: XPUB keeps matched pipes between failed non-blocking sends
2020-07-29 17:35:18 +01:00
Tarmo Tänav
27bf9bf7d0
Problem: XPUB keeps matched pipes between failed non-blocking sends
...
Solution: always unmatch all pipes before matching for an initial
message part.
2020-07-29 16:35:43 +03:00
Tarmo Tänav
75669de3c7
RELICENSE: Tarmo Tänav
2020-07-29 16:29:48 +03:00
Luca Boccassi
49f4c1898b
Merge pull request #3994 from fanquake/no_werror_macos
...
build: compile with -Werror by default on Darwin
2020-07-21 11:15:38 +01:00
fanquake
3a7b77d5f6
build: compile with -Werror by default on Darwin
...
Using -Werror has been disabled for Darwin since very early on in the
codebase. However at this point, I can't see an obvious reason why it
should still be disabled compared to when building for the other
operating systems.
I've tested compiling on macOS using Apple Clang 11.0.3, LLVM Clang
10.0.0 and GCC 10.1.
2020-07-21 16:08:21 +08:00
mileschet
571045d129
Ios135 ( #3991 )
...
* build_ios.sh now build for different archs
* change typo on build_ios.sh
Co-authored-by: Roberto Santacroce Martins <roberto.martins@transferoswiss.ch>
2020-07-11 13:11:59 +01:00
Luca Boccassi
d2d9719b4e
Merge pull request #3987 from fanquake/gethrtime_not_gethrtimei
...
build: fix gethrtime() function check in CMake
2020-07-07 21:36:35 +01:00
fanquake
c14817075c
build: fix gethrtime() function check in CMake
...
This looks like a typo introduced by
2d8ef84760b673d90db331e077fac369665cdbbd.
2020-07-07 21:45:08 +08:00
Luca Boccassi
1529ffbf42
Merge pull request #3986 from fanquake/ipc_mingw_cross_compile
...
build: disable IPC when cross-compiling with mingw
2020-07-07 09:11:42 +01:00
Luca Boccassi
4b4e19f915
Merge pull request #3985 from fanquake/test_flag_before_turning_off_warnings
...
build: test for warning options before enabling -Wno-* variant
2020-07-07 09:10:52 +01:00
Luca Boccassi
42a0977988
Merge pull request #3984 from fanquake/darwin_no_wno_uninitialized
...
build: don't compile with -Wno-uninitialized on darwin
2020-07-07 09:10:07 +01:00
fanquake
a396b780fd
build: disable IPC when cross-compiling with mingw
...
Master doesn't currently compile when crossing compiling using
autotools and mingw-w64. i.e:
```bash
x86_64-w64-mingw32-g++ (GCC) 9.3.0
./autogen.sh
./configure --host=x86_64-w64-mingw32
make src/libzmq.la
....
CXX src/libzmq_la-curve_server.lo
In file included from src/address.cpp:37:
src/ipc_address.hpp:40:10: fatal error: sys/socket.h: No such file or directory
40 | #include <sys/socket.h>
| ^~~~~~~~~~~~~~
compilation terminated.
```
I assume this hasn't been caught because appveyor is using CMake.
Mingw also does not have an afunix.h header. There is a thread upstream,
but there doesn't seem to have been any discussion:
https://sourceforge.net/p/mingw-w64/discussion/723797/thread/4c8ecdbe0d/ .
2020-07-07 13:25:21 +08:00
fanquake
fc5239e880
build: test for warning options before enabling -Wno-* variant
...
Some compilers, like GCC, will only warn about unknown -Wno-* options
when other warnings are being thrown, i.e:
```bash
CXX src/libzmq_la-address.lo
src/address.cpp: In function 'zmq::zmq_socklen_t zmq::get_socket_address(zmq::fd_t, zmq::socket_end_t, sockaddr_storage*)':
src/address.cpp:137:9: warning: unused variable 'unused' [-Wunused-variable]
137 | int unused;
| ^~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-tautological-constant-compare' may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option '-Wno-atomic-alignment' may have been intended to silence earlier diagnostics
CXX src/libzmq_la-channel.lo
```
They will also seem to accept the -Wno-* variant when it's tested for
using AX_CHECK_COMPILE_FLAG. So, rather than test for -Wno-* variants
that the compiler may pretend to understand, test for the actual option,
and only enable the -Wno-* case when it is available.
2020-07-07 11:06:44 +08:00
fanquake
f26b1ad8bb
build: don't compile with -Wno-uninitialized on darwin
...
This flag has been enabled for Darwin targets since the initial commit
in 4ed70a930202b103e7e80b8dc925e0aaa4622595. However, aside from the
fact that we likely no longer want to suppress uninitialized warnings,
this flag wont suppress them anyways, as it's included in the
CXX flags before -Wall (which enables -Wuninitialized). i.e:
```bash
g++ -std=gnu++11 ... -Wno-uninitialized ... -Wall <rest of flags>
```
2020-07-07 09:48:11 +08:00
Luca Boccassi
fc99911d90
Merge pull request #3983 from mileschet/ios135
...
added script to compile the lib to iphone sdk >= 13.5
2020-07-06 21:13:37 +01:00
Roberto Santacroce Martins
95e343caf3
added script to compile the lib to iphone sdk >= 13.5
2020-07-06 15:34:10 +02:00
Doron Somech
47ba2b1ef5
Merge pull request #3981 from bluca/fuzzers
...
Problem: no fuzz testing for websockets
2020-07-06 07:21:18 +03:00
Luca Boccassi
eb9118f0c9
Problem: no fuzz testing for websockets
...
Solution: add tests for plain WS
2020-07-05 23:43:58 +01:00
Luca Boccassi
2352e0a896
Problem: Github Action for fuzzer has a syntax error
...
Solution: fix it
2020-07-04 19:06:27 +01:00
Doron Somech
3396e95179
Merge pull request #3980 from bluca/fuzzers
...
Problems: fuzzer corpus file can be quite large, fuzzers not run in PRs
2020-07-04 21:01:58 +03:00
Luca Boccassi
877978adf7
Problem: fuzzers not run in PRs
...
Solution: do it
2020-07-04 17:50:35 +01:00
Luca Boccassi
e95e57d385
Problem: fuzzer corpus file can be quite large
...
Solution: move all corpora to the zeromq/libzmq-fuzz-corpora repository
for easier handling, and to avoid inflating the size of zeromq/libzmq.
Clone it for the CI on the fly.
2020-07-04 17:50:35 +01:00
Doron Somech
61c7ae0610
Merge pull request #3976 from bluca/fuzzers
...
Problem: we have to send a PR to oss-fuzz on every build change on the fuzzers
2020-06-30 20:34:30 +03:00
Luca Boccassi
734d6e4870
Problem: we have to send a PR to oss-fuzz on every build change on the fuzzers
...
Solution: move the script to our repo, and simply call it from oss-fuzz's script
2020-06-30 16:03:04 +01:00
Luca Boccassi
4dd504abeb
Merge pull request #3973 from bluca/fuzzers
...
Problem: test_security_zap occasionally segfaults
2020-06-30 16:02:04 +01:00
Bill Torpey
1cfd41c064
update sanitizer support
...
- enable undefined behavior sanitizer
- force release mode for sanitizer builds
2020-06-29 15:40:20 +01:00
Luca Boccassi
c8e3dfca90
Merge pull request #3974 from somdoron/pthread_cond_timedwait
...
problem: pthread_cond_timedwait sometimes fail with EINVAL
2020-06-28 17:36:26 +01:00
Doron Somech
fb852fd3e7
problem: pthread_cond_timedwait sometimes fail with EINVAL
...
Solution: fix rounding error and assert if the clock_gettime fails
2020-06-28 17:02:38 +03:00
Luca Boccassi
350b4b34f4
Problem: test_security_zap occasionally segfaults
...
Solution: check if a session's _pipe has been allocated before using
it, since as a consequence of creating the pipes after the handshake
it's no longer guaranteed to be there.
Fixes #3971
2020-06-28 13:37:07 +01:00
Doron Somech
d78ecb8dc8
Merge pull request #3968 from bluca/fuzzers
...
Problem: test_req_relaxed occasionally fails
2020-06-28 08:40:48 +03:00
Luca Boccassi
218655e4f7
Merge pull request #3969 from serg06/patch-3
...
Fix zmq_poller.txt
2020-06-27 23:26:58 +01:00
serg06
f03b67a50b
Fix zmq_poller.txt
...
Fixed three things:
1. Moved asterisks by variable names into the single quotes (to match [zmq_poll](https://github.com/zeromq/libzmq/edit/master/doc/zmq_init.txt ) and other pages.)
2. Fixed variable name in example.
3. Fixed extra & in example.
2020-06-27 17:58:16 -04:00
Luca Boccassi
5c5e279108
Problem: test_req_relaxed occasionally fails
...
Solution: instead of relying on timing to get the order
of connected rep sockets just right, wait for each connection
2020-06-27 21:57:29 +01:00
Doron Somech
ff9efa106e
Merge pull request #3967 from bluca/fuzzers
...
Problems: OBS build on sid fails, test_req_relaxed occasionally fails
2020-06-27 22:13:53 +03:00
Luca Boccassi
859f39b302
Problem: OBS build on sid fails
...
Solution: change the version format to non-native as a hack, to match
OBS' debstransform usage of 1.0 format
2020-06-27 18:27:47 +01:00
Luca Boccassi
1ddfeb56ec
Problem: formatting errors
...
Solution: run make clang-format-diff
2020-06-26 23:45:39 +01:00
Bill Torpey
c04f6581e0
rebase reconnect-redux on master ( #3960 )
...
* add option to stop reconnecting on failed handshake
2020-06-26 23:41:44 +01:00
Bill Torpey
c7aef56048
- resolve FPE when ZMQ_RECONNECT_IVL == 0
2020-06-26 16:16:31 +01:00
Luca Boccassi
d0d23446f5
Merge pull request #3962 from sigiesec/fix-clang-tidy-analyze
...
Problem: clang-tidy job is failing because package dependencies are o…
2020-06-19 17:31:20 +01:00
Simon Giesecke
3135f6b503
Problem: clang-tidy job is failing because package dependencies are outdated
...
Solution: update to llvm-toolchain-10
2020-06-19 17:58:26 +02:00
Doron Somech
522abc7376
Merge pull request #3959 from bluca/fuzzers
...
Problem: mtrie use of non-tail recursion leads to stack overflow
2020-06-17 14:35:26 +03:00
Luca Boccassi
ab301ebf79
Problem: mtrie use of non-tail recursion leads to stack overflow
...
Solution: convert add and rm functions to iterative algorithms
2020-06-16 21:10:59 +01:00
Luca Boccassi
e0e3ce081e
Problem: XPUB treats non-sub/cancel as sub/cancel
...
Solution: only process for sub/cancel if the messages are actually sub/cancel.
Regression introduced by cf9ccbb which tried to skip non-sub/cancel processing
for PUB.
2020-06-16 21:05:26 +01:00
Luca Boccassi
b4aa912467
Merge pull request #3958 from bluca/fix_tests
...
Problems: formatting error in ip.cpp and test_bind_fuzzer doesn't build on OSX
2020-06-16 21:05:04 +01:00
Luca Boccassi
3856027da9
Problem: test_bind_fuzzer does not build on OSX
...
Solution: use POSIX API instead of GNU extension
2020-06-15 23:47:35 +01:00
Luca Boccassi
1d2af8d388
Problem: formatting error in ip.cpp
...
Solution: fix it
2020-06-15 23:47:35 +01:00
Luca Boccassi
c8b141d964
Merge pull request #3955 from bluca/thread_doc
...
Problem: thread safety documentation is misleading
2020-06-11 19:07:56 +01:00
Luca Boccassi
7f83eeb1b7
Problem: thread safety documentation is misleading
...
Solution: change it to categorically state that non-thread-safe
sockets are not thread safe, ever
2020-06-09 10:25:18 +01:00
Doron Somech
7c3eaf864c
Merge pull request #3954 from bluca/blocklist
...
Problem: documentation uses unfriendly language
2020-06-08 21:45:22 +03:00
Luca Boccassi
4341f14f41
Problem: documentation uses unfriendly language
...
Solution: use more descriptive, accurate and welcoming terms like allowing
and blocking
2020-06-08 19:32:45 +01:00
Doron Somech
3f2529f3c7
Merge pull request #3952 from bluca/fuzzers
...
Problem: test_bind_fuzzer clobbers working directory with random socket files
2020-06-07 14:38:18 +03:00
Luca Boccassi
1ffc21d378
Problem: test_bind_fuzzer clobbers working directory with random socket files
...
Solution: move to /tmp before running the test
2020-06-07 12:09:17 +01:00
mjvk
b6bb3ef925
Adds NORM support to cmake ( #3951 )
2020-06-07 10:39:02 +01:00
Luca Boccassi
3a2b3bc625
Merge pull request #3943 from bjovke/small_fix
...
Problem: The code is wrong, socket option is never set.
2020-05-30 21:16:52 +01:00
Jovan Bunjevacki
c32462cde0
Small fix.
2020-05-30 20:30:23 +02:00
serg06
c89390f0f5
Make including Clang optional
...
I include libzmq in my cmake project, and I don't want clang-related targets popping up in Visual Studio's solution explorer.
2020-05-25 18:34:17 +01:00
serg06
efaeec33fc
RELICENSE grant
2020-05-25 18:33:52 +01:00
serg06
2e87390656
Initialize some CMake variables as empty before build
...
This prevents a bug that occurs when a parent has a `sources` variable when doing `add_subdirectory("libzmq")`.
2020-05-25 18:33:52 +01:00
Doron Somech
c95f7d0933
Merge pull request #3935 from bluca/fuzzers
...
Problem: small memory leaks in PUB/XPUB
2020-05-25 19:45:54 +03:00
Luca Boccassi
cf9ccbbd37
Problem: metadata is stored for PUB sockets and never processed
...
Solution: do not store user messages when the socket type is PUB, they
will never be processed
2020-05-25 15:49:32 +01:00
Luca Boccassi
821ab88f96
Problem: XPUB leaks unprocessed metadata on close
...
Solution: dereference and delete any metadata object left in memory
2020-05-25 15:49:32 +01:00
Doron Somech
b5a8825542
Merge pull request #3930 from bluca/fuzzers
...
Problem: MSAN fuzzers cannot run
2020-05-24 17:23:59 +03:00