0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-01 10:50:28 +08:00

8144 Commits

Author SHA1 Message Date
Luca Boccassi
2643470ff0 Add relicense statement from sradomski
As indicated by author's comment on Github:

https://github.com/zeromq/libzmq/pull/810#issuecomment-748587654
2020-12-20 10:57:55 +00:00
Luca Boccassi
76849aa3d5
Merge pull request #4104 from gummif/patch-1
Problem: Build error on MSVC with C++20 in ip.cpp
2020-12-18 12:59:09 +00:00
Gudmundur Adalsteinsson
83032a4d33
Problem: Build error on MSVC with C++20 in ip.cpp
Solution: Move initialization of variables before gotos.
2020-12-18 10:32:59 +00:00
Luca Boccassi
828d6eacba
Merge pull request #4098 from agnosy/problem/android-build-failure
Problem: Android build fails.
2020-12-05 11:10:46 +00:00
Sailaja Nagireddy
89a536dd1d Problem: Android build fails.
Solution: Update the android build helper to locate readelf binary
          included in android ndk.
2020-12-04 20:56:50 +05:30
Luca Boccassi
1533bc3620
Merge pull request #4095 from boxkey/boxkey-patch-2
add relicense.md file
2020-11-29 17:31:03 +00:00
boxkey
0344937e79
add relicense.md file
add relicense.md file boxkey.md
2020-11-30 01:15:34 +08:00
Luca Boccassi
17c5fca9ea
Merge pull request #4075 from nyfix/ndebug
The _DEBUG preprocessor definition is typically only set on Windows. …
2020-11-26 09:07:18 +00:00
Luca Boccassi
33a51f9e8b
Merge pull request #4088 from bluca/test_spec_req_eagain
Problem: tests fails to receive with EAGAIN on slow architectures
2020-11-23 13:32:59 +00:00
Luca Boccassi
bb15d9dd77 Problem: add-path no longer supported in Github Action
Solution: update setup-bsbuild action version

https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-11-18 13:49:50 +00:00
Luca Boccassi
d77c60a0db Problem: tests fails to receive with EAGAIN on slow architectures
Solution: remove arbitrary timeouts, as they are testing reliable pipes
with no contention, so if it can connect eventually it has to
work. The overall test timeout covers cases where it doesn't.

If tests want to use receive timeouts, they need to handle EAGAIN
properly.
2020-11-18 13:29:33 +00:00
Luca Boccassi
dae894157c
Merge pull request #4083 from ambitslix/patch-1
Create ambitslix.md
2020-11-12 09:43:26 +00:00
Attila M. Szilagyi
b54ad2b373
Create ambitslix.md 2020-11-11 22:07:36 -08:00
Luca Boccassi
1d6b232920
Merge pull request #4082 from zoedberg/fix_autogen
autogen.sh: fix autoreconf exit code log
2020-11-10 19:19:53 +00:00
Zoe Faltibà
b4c7954910
RELICENSE: add zoedberg grant 2020-11-10 20:08:38 +01:00
Zoe Faltibà
51bffc05f5
autogen.sh: fix autoreconf exit code log 2020-11-10 17:31:22 +01:00
Luca Boccassi
6f46375440
Merge pull request #4080 from ardrabczyk/docs-fixes
Fix a typo and wrong order of assert() in the examples
2020-11-10 09:38:33 +00:00
Arkadiusz Drabczyk
f0add07303 Problem: no relicense agreement by Arkadiusz Drabczyk
Solution: add a relicense agreement

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-10 10:35:21 +01:00
Luca Boccassi
c642d0f4ee
Merge pull request #4079 from ardrabczyk/errno-fixes
Problem: not all possible errno values were documented (#4078)
2020-11-10 09:16:59 +00:00
Arkadiusz Drabczyk
ce7c1cec87 Problem: assert() was used on undefined variables in the examples
Solution: use assert() on defined variables

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-09 22:52:12 +01:00
Arkadiusz Drabczyk
d3f59e68ea Problem: there is a typo: 'threda names'
Solution: fix a typo: threda names -> thread names

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-09 22:36:17 +01:00
Arkadiusz Drabczyk
d43ae07456 Problem: not all possible errno values were documented (#4078)
Solution: document more possible errno values

Signed-off-by: Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
2020-11-09 22:23:43 +01:00
Bill Torpey
57e9551744 The _DEBUG preprocessor definition is typically only set on Windows. (e.g., see https://stackoverflow.com/questions/2290509/debug-vs-ndebug/29253284#29253284) 2020-11-02 16:58:14 -05:00
Luca Boccassi
b2a0842063
Merge pull request #4074 from ffontaine/master
src/compat.hpp: fix build with libbsd and strlcpy
2020-11-02 09:18:30 +00:00
Fabrice Fontaine
8cb5708829 src/compat.hpp: fix build with libbsd and strlcpy
Don't include bsd/string.h if strlcpy is also defined in string.h to
avoid the following build failure on uclibc:

In file included from src/compat.hpp:41:0,
                 from src/ipc_address.cpp:31:
/tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/bsd/string.h:44:54: error: declaration of 'size_t strlcpy(char*, const char*, size_t)' has a different exception specifier
 size_t strlcpy(char *dst, const char *src, size_t siz);
                                                      ^
In file included from src/compat.hpp:34:0,
                 from src/ipc_address.cpp:31:
/tmp/instance-0/output-1/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/string.h:424:15: error: from previous declaration 'size_t strlcpy(char*, const char*, size_t) throw ()'
 extern size_t strlcpy(char *__restrict dst, const char *__restrict src,
               ^

Fixes:
 - http://autobuild.buildroot.org/results/51220b1b82774e8f6f6ed8593c58d2e3c31a1531

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-11-02 07:58:01 +01:00
Luca Boccassi
97b5f8560d Problem: formatting errors
Solution: run make clang-format-diff
2020-10-09 20:08:05 +01:00
Luca Boccassi
f578b26790
Merge pull request #4060 from martin-ksti/fix-stack-overflow-on-windows-x64
fix stack overflow on windows x64
2020-10-09 19:01:44 +01:00
Luca Boccassi
4f6d94de42
Merge pull request #4061 from martin-ksti/patch-1
Create martin-ksti.md
2020-10-09 17:15:56 +01:00
martin-ksti
4e5a328998
Create martin-ksti.md 2020-10-09 18:07:47 +02:00
Martin Labsch
3156764265 fix stack overflow on windows x64 2020-10-09 15:17:46 +02:00
Luca Boccassi
22d218a182 Problem: CI fails with formatting errors
Solution: run make clang-format-diff
2020-09-28 10:30:20 +01:00
C-sir
d4f03edd47
stop reconnect after called zmq_disconnect() (#4053) 2020-09-28 09:59:57 +01:00
Davit Kalantaryan
dfc85af4d0
using '_M_ARM' macros for Windows ARM comilation (#4051)
[why]
This is a standard microsoft compiler macros https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
This macros is defined for example for Windows 10 core Iot (for example paspberry pi windows compilation)

Co-authored-by: Davit Kalantaryan <davit.kalantar@desy.de>
2020-09-26 18:39:28 +01:00
Stéphane Valès
1495ccad58
Problem: warnings with xcode (#4043)
* remove override instructions to avoid a chain reaction with other overridden functions missing it

Co-authored-by: Stéphane Valès <stephane@vales.fr@users.noreply.github.com>
Co-authored-by: stephane vales <vales@ingenuity.io>
2020-09-17 15:12:36 +01:00
Stéphane Valès
86bf83bce8
Problem: cmake generates faulty xcode projects also for dynamic lib (#4042)
* apply the use of sources for xcode project also to dynamic library

Co-authored-by: Stéphane Valès <stephane@vales.fr@users.noreply.github.com>
Co-authored-by: stephane vales <vales@ingenuity.io>
2020-09-16 15:52:18 +01:00
Stéphane Valès
c098fa3c18
Problem: using targets in CMakeLists.txt creates a corrupted xcode project with cmake (#4041)
* use sources instead of objects only when generating an xcode project

Co-authored-by: Stéphane Valès <stephane@vales.fr@users.noreply.github.com>
Co-authored-by: stephane vales <vales@ingenuity.io>
2020-09-16 14:25:46 +01:00
Doron Somech
e915449184
Merge pull request #4038 from bluca/api_breakage
Problem: zmq_ctx_get API broken
2020-09-11 09:54:50 +03:00
Luca Boccassi
792ffe4d7a Problem: zmq_ctx_get API broken
Solution: restore EINVAL as errno on unknown option.
Broken by https://github.com/zeromq/libzmq/pull/3642 which started to
return EFAULT instead
2020-09-10 22:37:01 +01:00
Doron Somech
44786232f7
Merge pull request #4034 from bluca/news
Problem: 4.3.3 is out, need new version
2020-09-07 20:42:00 +03:00
Luca Boccassi
04f5bbedee Finalize changelog for 4.3.3 v4.3.3 2020-09-07 11:12:14 +01:00
Luca Boccassi
f2e364777e Problem: 4.3.3 is out, need new version
Solution: bump to 4.3.4
2020-09-07 11:12:14 +01:00
Luca Boccassi
b97ce25c26 Problem: NEWS does not mention security advisories
Solution: add them
2020-09-07 11:12:14 +01:00
Simon Giesecke
fd094fe2fc
Merge pull request #4032 from bluca/fuzzers
Problem: no fuzzing coverage for ZMQ_STREAM
2020-09-06 19:21:15 +02:00
Luca Boccassi
e708623c12 Problem: no fuzzing coverage for ZMQ_STREAM
Solution: add tests
2020-09-06 11:05:15 +01:00
Doron Somech
cbce0cbffe
Merge pull request #4031 from sigiesec/test-coverage-3
Some more test coverage for invalid IPC addresses
2020-09-05 15:03:07 +03:00
Simon Giesecke
2741e93361 Problem: no test for (invalid) too long ipc endpoint name
Solution: add test
2020-09-05 13:17:13 +02:00
Simon Giesecke
90d5cf29d8 Problem: no test for (invalid) empty abstract ipc endpoint name
Solution: add test
2020-09-05 13:17:13 +02:00
Luca Boccassi
04ac547c20
Merge pull request #4030 from sigiesec/test-coverage-3
Problem: code duplicated between handshake and out_event
2020-09-04 16:24:28 +01:00
Luca Boccassi
446d61a13b
Merge pull request #4029 from sigiesec/test-coverage-2
Add test covering tcp_address_mask_t and remove unused code
2020-09-04 15:51:33 +01:00
Simon Giesecke
6a45737073 Problem: code duplicated between handshake and out_event
Solution: extract do_handshake member function
2020-09-04 16:39:16 +02:00
Simon Giesecke
af7df64ae7 Problem: mask and to_string member functions of tcp_address_mask_t are not referenced
Solution: remove them
2020-09-04 15:51:43 +02:00
Simon Giesecke
c6301206dc Problem: no tests for ZMQ_TCP_ACCEPT_FILTER
Solution: add some tests
2020-09-04 15:51:33 +02:00
Luca Boccassi
e7974c3b72
Merge pull request #4028 from sigiesec/test-coverage
Some improvements to the test coverage job
2020-09-04 11:07:16 +01:00
Simon Giesecke
3033b1ef18 Problem: coverage build is using old distro
Solution: update to default distro
2020-09-04 11:10:37 +02:00
Simon Giesecke
eb7b7db05d Problem: assert used instead of zmq_assert
Solution: replace by zmq_assert
2020-09-04 10:58:16 +02:00
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