0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 17:58:01 +08:00

7049 Commits

Author SHA1 Message Date
Simon Giesecke
2e73554644 Problem: socks_connecter_t, vmci_connecter_t and vmci_listener_t duplicate code with stream_*_base_t
Solution: add TODO comments to resolve this debt
2019-02-02 15:23:56 +01:00
Simon Giesecke
b462cc0912 Problem: misleading comments referring to a "library shutdown"
Solution: change to refer to the context
2019-02-02 15:23:56 +01:00
Simon Giesecke
9a376fbe24 Problem: code duplication in get_address of ipc/tcp/tipc listener classes
Solution: pull up to base class
2019-02-02 15:23:56 +01:00
Simon Giesecke
5c81bbe82e Problem: norm_engine.cpp missing in CMakeLists.txt
Solution: added it
2019-02-02 15:23:56 +01:00
Luca Boccassi
4d8e5fb2e9
Merge pull request #3378 from sigiesec/refactor-stream-listeners-and-connecters
Refactor stream listeners and connecters
2019-02-01 11:26:13 +01:00
Luca Boccassi
1aa6f7070c
Merge pull request #3377 from sigiesec/fix-3376
Fix handling of random port numbers with tipc
2019-02-01 11:02:24 +01:00
Simon Giesecke
e162c8bda3 Problem: code duplication around getsockname
Solution: also use get_socket_address from base class
2019-02-01 04:58:57 -05:00
Simon Giesecke
2b04946f49 Problem: code duplication around getsockname
Solution: also use get_socket_address from base class
2019-02-01 04:58:57 -05:00
Simon Giesecke
c476cf3d14 Problem: implicit cast between signed and unsigned types on some platforms
Solution: perform explicit cast
2019-02-01 04:58:57 -05:00
Simon Giesecke
95eb8a7a99 Problem: parts of in_event duplicated across subclasses of stream_listener_base_t
Solution: extract function create_engine into base class
2019-02-01 04:58:57 -05:00
Simon Giesecke
93c1843f3e Problem: duplication across ipc_listener_t, tcp_listener_t, tipc_listener_t
Solution: extract common base class stream_listener_base_t
2019-02-01 04:58:57 -05:00
Simon Giesecke
a40a3b7a34 Problem: several data members in stream_connecter_base_t are visible more than necessary
Solution: make them private and adapt initialization order
2019-02-01 04:58:57 -05:00
Simon Giesecke
a766a4b67e Problem: reconnect_timer_id duplicated and essentially used only in base class
Solution: removed definitions and uses in subclasses
2019-02-01 04:58:57 -05:00
Simon Giesecke
bed3b0cfb4 Problem: tipc_listener_t data members not conforming to naming style
Solution: add underscore prefix
2019-02-01 04:58:57 -05:00
Simon Giesecke
2a5fb6cb8e Problem: ipc_listener_t data members not conforming to naming style
Solution: add underscore prefix
2019-02-01 04:58:57 -05:00
Simon Giesecke
7e73587741 Problem: duplication in *_event methods across subclasses of stream_connecter_base_t
Solution: pull up common code, introduce new create_engine function in base class
2019-02-01 04:58:57 -05:00
Simon Giesecke
a09099a615 Problem: process_term and close duplicated across subclasses of stream_connecter_base_t
Solution: pull up
2019-02-01 04:58:57 -05:00
Simon Giesecke
531df586d0 Problem: rm_fd code duplicated across stream_connecter_t subclasses
Solution: pull up tcp_connecter_t::rm_handle and use in all subclasses
2019-02-01 04:58:57 -05:00
Simon Giesecke
1a230e89ca Problem: process_plug, get_new_reconnect_ivl and add_reconnect_timer duplicated across subclasses of stream_connector_base_t
Solution: pull up to stream_connector_base_t
2019-02-01 04:58:57 -05:00
Simon Giesecke
74667ebcba Problem: destructors of tcp_connecter_t, ipc_connecter_t, tipc_connecter_t contain duplicated code
Solution: pull up to stream_connecter_base_t
2019-02-01 04:58:57 -05:00
Simon Giesecke
d6f8d246e2 Problem: data members are duplicated across tcp_connecter_t, ipc_connecter_t, tipc_connecter_t
Solution: extract common base class stream_connecter_base_t
2019-02-01 04:58:47 -05:00
Simon Giesecke
361d7168ad Problem: tipc_connector_t::_handle_valid is redundant
Solution: replace by checks against valid value of _handle
2019-02-01 04:33:03 -05:00
Simon Giesecke
a13eb1a9d8 Problem: ipc_connector_t::_handle_valid is redundant
Solution: replace by checks against valid value of _handle
2019-02-01 04:33:03 -05:00
Simon Giesecke
065e81879a Problem: tipc_connector_t::_timer_started is unspecifically named
Solution: rename to _reconnect_timer_started
2019-02-01 04:33:03 -05:00
Simon Giesecke
ca87aaed57 Problem: ipc_connector_t::_timer_started is unspecifically named
Solution: rename to _reconnect_timer_started
2019-02-01 04:33:03 -05:00
Simon Giesecke
c94ad64876 Problem: tipc_connector_t data members not conforming to naming conventions
Solution: add underscore prefix to data members
2019-02-01 04:33:03 -05:00
Simon Giesecke
58063a75a2 Problem: ipc_connector_t data members not conforming to naming conventions
Solution: add underscore prefix to data members
2019-02-01 04:33:03 -05:00
Simon Giesecke
4d362887bb Problem: stream_engine_t::_endpoint is unnecessarily non-const
Solution: declare _endpoint const
2019-02-01 04:33:03 -05:00
Simon Giesecke
091df743a8 Problem: stream_engine_t::_peer_address is unnecssarily non-const
Solution: extract initialization code into get_peer_address function and declare _peer_address const
2019-02-01 04:33:03 -05:00
Simon Giesecke
ae79b41d4c Problem: bug in tipc_listener_t::set_address, random port is determined but not used
Solution: assign result to address

Fixes #3376
2019-02-01 04:30:20 -05:00
Simon Giesecke
afe48e2b16 Problem: unnecessary explicit definitions/deletions of special member functions in tipc_address_t
Solution: remove them
2019-02-01 04:28:35 -05:00
Simon Giesecke
19b64709bb
Merge pull request #3374 from bluca/hurd
Problem: one more test fails on GNU/Hurd
2019-01-28 09:51:50 +01:00
Luca Boccassi
9fae3d1f10 Problem: one more test fails on GNU/Hurd
Solution: mark test_rebind_ipc as XFAIL on Hurd as it does not
implement getsockname on IPC and thus it's impossible to use
wildcard IPC binds.
Document that ZMQ_LAST_ENDPOINT does not work on Hurd with IPC.
2019-01-27 14:04:18 +00:00
Doron Somech
fe4e333334
Merge pull request #3369 from bluca/abi_checker_travis
Problem: have to check ABI compatibility manually
2019-01-20 20:24:09 +02:00
Luca Boccassi
f9b0945c1b Problem: have to check ABI compatibility manually
Solution: automate it on Travis
2019-01-20 16:38:17 +00:00
Constantin Rack
331fee4b38
Merge pull request #3368 from bluca/release_branch
Problem: race condition breaks automated OBS release
2019-01-20 16:51:26 +01:00
Luca Boccassi
51557b9b96 Problem: race condition breaks automated OBS release
Solution: instead of using a temporary release branch that gets
deleted after an arbitrary timer, which never matches the time OBS
actually takes to do a full git clone, keep the branch permanently
in place and simply move it forward to the latest tag on each
release.
2019-01-20 14:34:29 +00:00
Constantin Rack
329155655c
Merge pull request #3367 from bluca/alignment_cache_size
Problems: test failures on PPC and GNU/hurd
2019-01-20 08:42:03 +01:00
Luca Boccassi
3b6db4b370 Problem: test_pair_ipc fails on GNU/Hurd due to wildcard bind
Solution: mark it as XFAIL like the other tests that use ipc://*
2019-01-19 22:28:15 +00:00
Luca Boccassi
bfb4a868fc Problem: atomic intrinsics unreliable on PPC64 and RISC-V
Solution: prefer CXX11 atomics if they are available to compiler
intrinsics.
test_hwm_pubsub fails 50% of the times on PPC64 and RISC-V with an
apparent memory corruption of messages sent by the application thread
to the I/O thread when using compiler intrinsics.
Switching to CXX11 atomics makes the test reliable again. The
standard API should be preferred anyway, if available.
2019-01-19 21:42:54 +00:00
Luca Boccassi
8040e28b26 Problem: posix_memalign autoconf check broken on some platforms
Solution: import macro from autoconf-archive that works better
than AC_CHECK_FUNCS
2019-01-19 21:06:23 +00:00
Luca Boccassi
4a0c83fb12 Problem: yqueue false sharing issues on PPC64
Solution: detect cacheline size for aligment purposes at build time
instead of hard-coding it, so that PPC and S390 can align to a value
greater than the 64 bytes default.
Uses libc getconf program, and falls back to the previous value of 64
if not found.
2019-01-19 20:08:14 +00:00
Doron Somech
0761e6bb48
Merge pull request #3364 from bluca/thread_priority_get
Problem: ZMQ_SOCKET_LIMIT and ZMQ_THREAD_PRIORITY have the same value
2019-01-15 22:23:16 +02:00
Luca Boccassi
93b3689376 Problem: ZMQ_SOCKET_LIMIT and ZMQ_THREAD_PRIORITY have the same value
Solution: remove documents and tests for ZMQ_THREAD_PRIORITY getter. It
never worked and can never work as it has the same value as a get-only
option ZMQ_SOCKET_LIMIT. It cannot be changed without breaking ABI.
Note that the setter works fine as ZMQ_SOCKET_LIMIT is get-only.
2019-01-15 19:58:42 +00:00
Doron Somech
f0d97e0243
Merge pull request #3363 from bluca/tests_race_conditions
Problem: GCC warnings about string overflows in tests
2019-01-15 07:54:00 +02:00
Luca Boccassi
4d38552445 Problem: GCC warnings about string overflows in tests
Solution: mostly false positives, but fix them
2019-01-14 23:50:56 +00:00
Luca Boccassi
87dbd39ae0
Merge pull request #3361 from bluca/gssapi_pkgconfig
Problem: gssapi pkg-config check in configure.ac does not work
2019-01-14 20:59:49 +00:00
Luca Boccassi
73ae7a349b Problem: gssapi pkg-config check in configure.ac does not work
Solution: correctly enable the definition in platform.hpp so that the
gssapi support is actually built in if requested and available.
2019-01-14 14:51:03 +00:00
Constantin Rack
e21988d02b
Merge pull request #3360 from bluca/cve
Problem: NEWS for 4.3.1 does not mention CVE number
2019-01-14 11:02:02 +01:00
Luca Boccassi
bfba6e5a36 Problem: NEWS for 4.3.1 does not mention CVE number
Solution: add it now that it's been assigned
2019-01-14 09:54:19 +00:00
Simon Giesecke
2d02597964
Merge pull request #3359 from bluca/tests_race_conditions
Problem: test_rebind_ipc still fails
2019-01-14 08:09:57 +01:00
Luca Boccassi
d55956574d Problem: test_rebind_ipc still fails
Solution: create manually the random IPC file to reuse
2019-01-14 00:33:36 +00:00
Constantin Rack
ac9583973c
Merge pull request #3358 from bluca/tests_race_conditions
Problems: test failing on SPARC64 and hard-coded socket binds
2019-01-13 20:16:59 +01:00
Luca Boccassi
f64b697095 Problem: tests use hard-coded fixed IPC file path
Solution: use wildcards or random directories to avoid races when
multiple users are running the same test on the same machine
2019-01-13 14:50:54 +00:00
Luca Boccassi
4147957a5e Problem: test_security_zap fails on architectures that disallow unaligned pointer access
Solution: use memcpy instead of doing pointer arithmetics with casting
and dereferencing to fix the error on sparc64
2019-01-13 13:10:05 +00:00
Constantin Rack
6a3c8b46f6
Merge pull request #3357 from bluca/news
Problem: versions are out of date
2019-01-12 19:16:03 +01:00
Luca Boccassi
73d41cec57 Problem: versions are out of date
Solution: bump ABI and revisions and changelog now that v4.3.1 is out
2019-01-12 16:10:36 +00:00
Luca Boccassi
2cb1240db6 Finalise changelog for 4.3.1 v4.3.1 2019-01-12 16:05:39 +00:00
Constantin Rack
690cd894e6
Merge pull request #3356 from bluca/news
Problem: NEWS out of date with recent changes
2019-01-12 17:02:29 +01:00
Luca Boccassi
3ce8b11aa3 Problem: NEWS out of date with recent changes
Solution: update it
2019-01-12 15:14:43 +00:00
Doron Somech
3154f3eab7
Merge pull request #3355 from bluca/formatting
Problem: small formatting issue highlighted by clang
2019-01-09 14:30:28 +02:00
Luca Boccassi
e9fd5aae43 Problem: small formatting issue highlighted by clang
Solution: fix it with make clang-format-diff
2019-01-09 12:02:58 +00:00
Luca Boccassi
4ca3d430fe
Merge pull request #3353 from guidovranken/v2_decoder-overflow-rce-fix
V2 decoder overflow RCE fix
2019-01-09 12:01:43 +00:00
Guido Vranken
731be4bd59 Problem: Compilation error due to comparison between signed and unsigned expressions
Solution: Cast the signed expression (which is always positive) to unsigned

Signed-off-by: Guido Vranken <guidovranken@gmail.com>
2019-01-09 12:36:28 +01:00
Guido Vranken
dcf001906a Problem: no relicense agreement by guidovranken
Solution: added relicense agreement

Signed-off-by: Guido Vranken <guidovranken@gmail.com>
2019-01-08 23:44:04 +01:00
Guido Vranken
1a2ed12716 Problem: pointer overflow in zmq::v2_decoder_t::size_ready leading to remote code execution (issue #3351)
Solution: refactor bounds check arithmetic such that no overflow shall occur

Signed-off-by: Guido Vranken <guidovranken@gmail.com>
2019-01-08 23:39:41 +01:00
Luca Boccassi
7302b9b8d1
Merge pull request #3345 from ssbl/unused-import
Problem: unused import and inconsistent use of const
2019-01-02 15:55:08 +00:00
Shubham Lagwankar
cc686f15f4 Problem: unused import and inconsistent use of const
Solution: remove unused import and fix const placement.
2019-01-02 10:25:21 -05:00
Simon Giesecke
fc36c7d2c4
Merge pull request #3343 from bluca/pull_atomic_drop
Problem: race condition in PUSH might break atomicity
2018-12-30 12:18:39 +01:00
Luca Boccassi
9bd9cbbeea Problem: race condition in PUSH might break atomicity
Solution: if a multi-part message cannot be delivered by a PUSH socket
because the pipe is broken mid-way, drop the rest of the frames so that
the atomicity property is not broken.
2018-12-28 17:55:19 +01:00
Luca Boccassi
b65b523a39
Merge pull request #3341 from sigiesec/migrate-more-tests
Problem: tests without test framework
2018-12-25 17:08:59 +01:00
Simon Giesecke
88bea4fd73 Problem: tests without test framework
Solution: migrate to unity
2018-12-25 13:50:31 +01:00
Simon Giesecke
cb2b9a8cd2
Merge pull request #3338 from bluca/android_pkgconfig
Problem: Android helper does not redirect pkg-config
2018-12-17 11:41:39 -05:00
Luca Boccassi
7f34ca52c8 Problem: Android helper does not redirect pkg-config
Solution: set the appropriate options, environment variables and paths
so that the host pkg-config files are ignored, and the target ones are
used instead (if any)
2018-12-17 13:58:04 +00:00
Luca Boccassi
16af86d49c
Merge pull request #3337 from sigiesec/sigiesec/migrate-more-tests
Migrate more tests to Unity
2018-12-16 17:52:00 +00:00
Simon Giesecke
affe77280c Improved test assertion message 2018-12-16 12:28:42 -05:00
Simon Giesecke
00f4bd05be Problem: tests without test framework
Solution: migrate to unity
2018-12-16 12:28:42 -05:00
Constantin Rack
1c604c6212
Merge pull request #3336 from bluca/pkgconfig_requires
Problem: pkg-config file cannot be used for static linking, missing dependencies in packaging
2018-12-15 09:10:31 +01:00
Luca Boccassi
c27afbca27 Problem: dev packages do not depend on static deps
Solution: add them so that pkg-config Requires.private is
satisfied
2018-12-15 00:44:00 +00:00
Luca Boccassi
28d5ce3dfa Problem: pkg-config file cannot be used for static linking
Solution: use requires.private, which pkg-config expands recursively
so that dependencies of dependencies can be linked against when
using pkg-config --static
2018-12-15 00:44:00 +00:00
Luca Boccassi
9d06e29cb2 Problem: duplicated pkg-config template
Solution: use the same for both autotools and cmake
2018-12-14 23:27:42 +00:00
Luca Boccassi
ed8ed727c6
Merge pull request #3335 from jcourreges/back-to-ld-version-script
Go back to ld --version-script to hide private symbols
2018-12-14 18:41:59 +00:00
Jeremie Courreges-Anglas
687c75858e Problem: libtool -export-symbols-regexp seems to leak weak symbols
Solution: go back to using -Wl,--version-script.

Use ax_check_vscript.m4 from the autoconf-archive to detect support on
multiple platforms (eg Solaris ld(1) -M).

libtool -export-symbols-regexp used ld(1) --retain-symbols-file under
the hood, the latter lets some C++ weak symbols make their way into the
dynamic symbols table, along with the zmq_* interface.  The reason for
such behavior is unknown to me.
2018-12-14 18:48:39 +01:00
Luca Boccassi
546f8e7205
Merge pull request #3334 from jacquesg/nodelay-after-connect
TCP_NODELAY is set prior to connecting
2018-12-14 10:15:11 +00:00
Jacques Germishuys
9d8c2b3843 Problem: no relicensing grant for my contributions
Solution: add it
2018-12-14 11:53:56 +02:00
Jacques Germishuys
a1ace32650 Problem: TCP_NODELAY is set prior to connecting, which is problematic on Windows
Solution: Set TCP_NODELAY after connect()

Reference: https://mail.openvswitch.org/pipermail/ovs-dev/2014-October/290251.html
2018-12-14 11:49:05 +02:00
Simon Giesecke
cfbbfb8ab8
Merge pull request #3333 from erickt/patch-1
Fix a typo - lenght to length
2018-12-14 03:13:44 -05:00
Erick Tryzelaar
a92585586b
Fix a typo - lenght to length
Noticed there was a small typo in the documentation.
2018-12-13 20:32:29 -08:00
Luca Boccassi
b70d31c432
Merge pull request #3328 from sigiesec/sigiesec/migrate-more-tests
Problem: tests without test framework
2018-12-10 12:51:22 +00:00
Simon Giesecke
4a48184032 Problem: tests without test framework
Solution: migrate to unity
2018-12-10 07:01:06 -05:00
Luca Boccassi
65e72f9f0a
Merge pull request #3327 from sigiesec/migrate-more-tests
Problem: tests without test framework
2018-12-09 16:27:05 +00:00
Simon Giesecke
a8b2e5a617 Problem: tests without test framework
Solution: migrate to unity
2018-12-09 07:36:39 -05:00
Luca Boccassi
f025129768
Merge pull request #3326 from hgourvest/master
Switching or desactivate wifi can crash Android application
2018-12-08 14:14:00 +00:00
Henri Gourvest
a6b5c75198 Problem: Switching or desactivate wifi can lead to have EINVAL error code
returned on Android.
Solution: Avoid killing the application, allows to take
the appropriate measures to this situation.
2018-12-08 14:33:32 +01:00
Luca Boccassi
aaaec894d3
Merge pull request #3325 from jcourreges/platforms-conditionals-cleanup
Platforms conditionals cleanup
2018-12-07 20:31:53 +00:00
Jeremie Courreges-Anglas
941915d142 Problem: needlessly complicated conditionals in Makefile.am
Solution: the generic approach taken in 70b48a9 allows us to use the
same LDFLAGS on most platforms.
2018-12-07 20:36:51 +01:00
Jeremie Courreges-Anglas
386fa6e013 Problem: unused Debian/kFreeBSD-specific code
Solution: delete it
2018-12-07 20:31:25 +01:00
Luca Boccassi
4d1d64b764
Merge pull request #3322 from jcourreges/libtool-export-symbols
Portable solution for library symbols visibility
2018-12-07 18:06:36 +00:00
Luca Boccassi
36745fbf0d
Merge pull request #3324 from jcourreges/jcourreges-relicense
Relicensing grant for my contributions (jcourreges)
2018-12-07 18:05:36 +00:00
Jérémie Courrèges-Anglas
70b48a9c0c Problem: --version-script not used on OpenBSD
Solution: switch to libtool symbol visibility support, which leads to
more portable constructs in the autotools glue.  As noted in the libtool
documentation "This option has no effect on some platforms."

After this commit, global symbols intended to be kept private will
disappear on platforms that were previously not handled
using -Wl,--version-script.
2018-12-07 18:58:19 +01:00