From 397ac80850bf8d010fae23dd215db0ee2c677306 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 7 May 2020 00:19:40 +0100 Subject: [PATCH 1/2] Problem: ZMTP v1 static allocator is needlessly resized Solution: don't do it, resizing the shared allocator makes sense as it can take the message buff for zero copy, but the static allocator is fixed --- src/decoder_allocators.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/decoder_allocators.hpp b/src/decoder_allocators.hpp index f6b967be..2620f1b8 100644 --- a/src/decoder_allocators.hpp +++ b/src/decoder_allocators.hpp @@ -58,7 +58,8 @@ class c_single_allocator std::size_t size () const { return _buf_size; } - void resize (std::size_t new_size_) { _buf_size = new_size_; } + // This buffer is fixed, size must not be changed + void resize (std::size_t new_size_) { LIBZMQ_UNUSED (new_size_); } private: std::size_t _buf_size; From 98efa79f540aa2094f81d7681058e6561504449b Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 8 May 2020 01:12:15 +0100 Subject: [PATCH 2/2] Problem: ZMQ_DISABLE_TEST_TIMEOUT does not work anymore Solution: restore it so that it can be set via CPPFLAGS, to avoid tests timing out when running in GDB --- tests/testutil.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testutil.cpp b/tests/testutil.cpp index 4c7e9e89..971159a3 100644 --- a/tests/testutil.cpp +++ b/tests/testutil.cpp @@ -233,10 +233,12 @@ void setup_test_environment (int timeout_seconds_) // abort test after 121 seconds alarm (121); #else +#if !defined ZMQ_DISABLE_TEST_TIMEOUT // abort test after timeout_seconds_ seconds alarm (timeout_seconds_); #endif #endif +#endif #if defined __MVS__ // z/OS UNIX System Services: Ignore SIGPIPE during test runs, as a // workaround for no SO_NOGSIGPIPE socket option.