0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

8497 Commits

Author SHA1 Message Date
Luca Boccassi
abb0ada5f7
Merge pull request #4494 from sphaero/depr_sprintf
deprecate sprint and replace with snprintf
2023-01-24 23:36:00 +00:00
Arnaud Loonstra
f7df6c8599 deprecate sprint and replace with snprintf 2023-01-24 22:45:48 +01:00
Luca Boccassi
b674ce68d0
Merge pull request #4490 from bluca/ci
Problem: various CI issues
2023-01-16 10:28:05 +00:00
Luca Boccassi
a820627f55 Problem: test_zmq_ppoll_signals does not cleanup context
Solution: do it, to avoid false positive in valgrind
2023-01-16 00:52:30 +00:00
Luca Boccassi
7e0fdd82de Problem: test_zmq_ppol_signals uses fixed TCP port
Solution: use random one to avoid random failures
2023-01-16 00:52:30 +00:00
Luca Boccassi
117cbe690c Problem: buffer overflow in new test case
Solution: fix it
2023-01-15 23:44:12 +00:00
Luca Boccassi
ee9c0919e2 Problem: address sanitizer complains about uninitialised func pointer
Solution: just call the function directly
2023-01-15 23:44:00 +00:00
Luca Boccassi
3cafc0c260
Merge pull request #4489 from bluca/ci
Problem: various CI issues
2023-01-12 09:49:59 +00:00
Luca Boccassi
78777fb9f5 Problem: shipping binaries is a responsibility that requires time
Solution: stop shipping binary releases for Windows. These days there's vcspkg, conda and more
that provide pre-built binaries for Windows.
Being a software supplier requires a lot of time and effort, and we have no bandwidth.
2023-01-12 01:07:06 +00:00
Luca Boccassi
961206abd5 Problem: libsodium doesn't build anymore in VS2010
Solution: disable it in appveyor, not our problem to solve
2023-01-12 01:07:06 +00:00
Luca Boccassi
7781dd1bbd Problem: formatting errors with clang-format-11
Solution: apply update
2023-01-12 01:07:06 +00:00
Luca Boccassi
47d0ecf639 Problem: missing VMCI can also return EPROTONOSUPPORT and the tests fail
Solution: ignore that too
2023-01-12 01:07:06 +00:00
Luca Boccassi
634cf9eea7 Problem: windows-2016 build no longer runs in CI
Solution: remove it
2023-01-12 01:07:06 +00:00
Luca Boccassi
3919956535 Problem: build fails with PGM + CXX98 + clang++
Solution: redefine 'restrict' which is used as an attribute in PGM headers,
but that is not available when using clang and CXX98
2023-01-11 23:43:13 +00:00
Luca Boccassi
049f79f72e
Merge pull request #4488 from ilkondr/ilkondr/poll_eintr
Problem: message can't be received due to signal
2023-01-10 18:55:45 +00:00
Ilya Kondrashkin
04720b6b91 Problem: message can't be received due to signal
Issue caught in Golang runtime, which widely uses signal SIGURG for
scheduling. Sometimes messages cannot be received. Technically
socket_base_t::process_commands() returns failure even if some commands were
processed, but next message from mailbox could not be received during interrupt.

Solution: retry receiving from mailbox with zero timeout after EINTR.

Signed-off-by: Ilya Kondrashkin <ikondrashkin@nfware.com>
2023-01-10 16:04:56 +00:00
Luca Boccassi
8d0f6f359e
Merge pull request #4486 from Rabenda/fix/qemu-user-build
fix: fix build on qemu-user
2023-01-09 17:25:29 +00:00
Han Gao
48960c2293 fix: fix build on qemu-user
In qemu-user, CACHELINE_SIZE probe is undefined

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2023-01-10 01:12:20 +08:00
Luca Boccassi
bdd471fa17
Merge pull request #4480 from trofi/gcc-13-rebind-fix
src/secure_allocator.hpp: define missing 'rebind' type
2022-12-22 11:51:15 +01:00
Sergei Trofimovich
438d5d8839 src/secure_allocator.hpp: define missing 'rebind' type
`gcc-13` added an assert to standard headers to make sure custom
allocators have intended implementation of rebind type instead
of inherited rebind. gcc change:
    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=64c986b49558a7

Without the fix build fails on this week's `gcc-13` as:

    [ 92%] Building CXX object tests/CMakeFiles/test_security_curve.dir/test_security_curve.cpp.o
    In file included from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:34,
                     from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_uninitialized.h:64,
                     from /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/memory:69,
                     from tests/../src/secure_allocator.hpp:42,
                     from tests/../src/curve_client_tools.hpp:49,
                     from tests/test_security_curve.cpp:53:
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<zmq::secure_allocator_t<unsigned char>, unsigned char, void>':
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = zmq::secure_allocator_t<unsigned char>; _Up = unsigned char]'
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = unsigned char; _Alloc = zmq::secure_allocator_t<unsigned char>]'
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<zmq::secure_allocator_t<unsigned char>, unsigned char>::rebind<unsigned char>'
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:88:21:   required from 'struct std::_Vector_base<unsigned char, zmq::secure_allocator_t<unsigned char> >'
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/stl_vector.h:423:11:   required from 'class std::vector<unsigned char, zmq::secure_allocator_t<unsigned char> >'
    tests/../src/curve_client_tools.hpp:64:76:   required from here
    /<<NIX>>/gcc-13.0.0/include/c++/13.0.0/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
       70 |                         _Tp>::value,
          |                               ^~~~~

The change adds trivial `rebind` definition with expected return type
and satisfies conversion requirements.
2022-12-20 23:00:53 +00:00
Luca Boccassi
dfbfc59c3f
Merge pull request #4432 from Teebonne/patch-1
sodium, not Sodium
2022-12-06 14:39:21 +01:00
Teebonne
da74015b85
Create Teebonne.md 2022-12-06 10:37:55 +00:00
Francesco Montorsi
c59104a01d
Add ZMQ_TOPICS_COUNT socket option (#4459) 2022-11-29 12:00:11 +00:00
Luca Boccassi
20de92ac0a
Merge pull request #4466 from td-krzysiek/fix-missing-sodium-link-directory
fix missing sodium link_directories
2022-11-24 10:51:11 +01:00
Krzysztof Rosiński
2eb9d59cb7 add relicense note 2022-11-24 10:39:02 +01:00
Krzysztof Rosiński
80e5bfeade fix missing sodium link_directories 2022-11-24 06:40:06 +01:00
Luca Boccassi
037dd199af
Merge pull request #4462 from stephan57160/master
Problem: Android build scripts need more enhancements.
2022-11-21 13:11:48 +01:00
Stephan Guilloux (cos)
684ebb2616 Problem: Main documentation refers to Android NDK 24, when 25 is currently in use.
Solution: Fix invalid NDK reference.
2022-11-21 12:15:59 +01:00
Stephan Guilloux (cos)
fcd519ba66 Android specific documentation update. 2022-11-21 12:15:38 +01:00
Stephan Guilloux (cos)
117ddabd02 Android minor fix in documentation. 2022-11-21 11:41:33 +01:00
Stephan Guilloux (home)
9f47e064a1 Documentation update. 2022-11-21 00:21:30 +01:00
Stephan Guilloux (home)
ebe0edaaa9 More enhancements and configuration variables to Android CI build scripts.
init_dependency_root(): Moved to android_build_helper.sh

ANDROID_DEPENDENCIES_DIR: added to specify a storage for dependencies
when downloaded automatically.

ANDROID_BUILD_DIR: Changed the default in ci_build.sh.

ci_build.sh configures these 2 variables to no more use /tmp by default (
except for Android NDK), but a local clone subfolder.

This helps to find downloaded dependencies and generated binaries.

This avoid to have user permission conflicts, or conflicts with 2
different clones of LIBZMQ (for instance).
2022-11-21 00:21:30 +01:00
Guilloux Stephan (Ubuntu)
40620f9b7b Android helpers minor fixes. 2022-11-21 00:21:30 +01:00
Guilloux Stephan (Ubuntu)
30e950abfd Problem: Android dependencies are downloaded in an hard-coded /tmp/tmp-deps.
Solution: Added variable ANDROID_DEPENDENCIES_DIR, and initialize to
/tmp/tmp-deps, to avoid clash with existing code.
2022-11-21 00:21:30 +01:00
Guilloux Stephan (Ubuntu)
91bc18ee16 Enriched Android helpers
2 more functions are added:
- android_clone_library():

  Similar to android_clone_library(), but fetch a tarball and uncompress it.

  So far, only .tar.gz and .tgz archives are supported, but could be enhanced
  easily, if needed.

- android_init_dependency_root():

  Initialize or check XXX_ROOT, when XXX is a dependency name.

  Enhanced version of init_android_root() in build.sh (to be dropped, then).
  This version is now also applicable in CZMQ & ZYRE CI builds scripts for Android.
2022-11-21 00:21:30 +01:00
Guilloux Stephan (Ubuntu)
3aeadbd1c2 Problem: android_build_library can be more robust & generic
With these changes, this function is now able to build LIBZMQ but also
(almost) CZMQ, ZYRE (and their dependencies) in native or cross compilation
modes.
2022-11-21 00:21:30 +01:00
Guilloux Stephan (Ubuntu)
f91e3e41fa Problem: android_clone_library() review
Basically, only local vars renamed.
New coming functions will use the same local vars naming.
2022-11-21 00:21:30 +01:00
Guilloux Stephan (Ubuntu)
308c94e9d8 Problem: android_download_ndk can be more 'autonomous'. 2022-11-21 00:21:30 +01:00
Francesco Montorsi
7fad9599ab
Fix typo in zmq_socket_monitor_versioned docs (#4458)
* Fix typo in zmq_socket_monitor_versioned docs
2022-11-15 22:18:11 +00:00
Luca Boccassi
3ff3c6cdf3
Merge pull request #4456 from djolemanojlovic/fix_4106
Problem: Handshake timeout error with ZMTP_2_0
2022-11-11 15:14:39 +01:00
Đorđije Manojlović
aeea10c068 Add RELICENSE statement 2022-11-11 12:26:44 +01:00
Đorđije Manojlović
6cc694d8c2 Problem: Handshake timeout error with ZMTP_2_0
When two parties are trying to establish ZMTP connection and do a
handshake, in which one partie selects hanshake version 2 or lower
has been selected, handshake timer fires always (by default after 30s)
as the timer never gets cancelled.

Solution: Cancel handshake timer after handhake has been done.
2022-11-11 12:26:44 +01:00
Luca Boccassi
8d4f4efef0
Merge pull request #4452 from stephan57160/master
Problem: Android helpers have duplicate init code.
2022-10-27 16:09:27 +02:00
Guilloux Stephan (Ubuntu)
6d9c0b8366 Problem: Android helpers have duplicate init code.
Last PRs introduced a duplicate code in Android helper file.
Duplicate "Initialisation" sequence can be observed after the helper functions:

    ########################################################################
    # Initialization

...

    # (Empty string indicates no failure)
    ANDROID_BUILD_FAIL=()

Seen when trying to report last LIBZMQ Android PRs to CZMQ & ZYRE.

Solution: Remove the duplicate code.
2022-10-27 15:46:16 +02:00
Luca Boccassi
1d3ad106ac
Merge pull request #4451 from stephan57160/master
Problem: Android build documentation is outdated.
2022-10-24 23:10:30 +02:00
Luca Boccassi
c1bcb53b12
Merge pull request #4450 from stephan57160/master
Problem: Android docker image is outdated.
2022-10-24 21:32:35 +02:00
Stephan Guilloux (cos)
8742763c04 Problem: Android build documentation to be updated.
Solution: Update Android build documentation.
2022-10-24 21:04:30 +02:00
Stephan Guilloux (cos)
0e887a4037 Problem: Android docker image is outdated.
Solution: Update image.

Added references to tested versions (Ubuntu, debian) and tested NDK.
Carefull though. Android have changed there NDK naming, between 22 and 23.
2022-10-24 20:56:52 +02:00
Luca Boccassi
bfd506094a
Merge pull request #4449 from stephan57160/master
Problem: Android helpers must provide build/clone functions.
2022-10-24 19:58:49 +02:00
Stephan Guilloux (cos)
6fb3a58ca8 Problem: Android helpers must provide build/clone functions.
Reason: Code factorisation & code sharing.

Solution: Create more functions in helper file:
- android_clone_library   # Clone a library source tree.
- android_build_library   # Build a library in its source tree.
2022-10-24 19:32:01 +02:00