From 65a3a57a085d41dbfd45db9da2819ca62dd699b1 Mon Sep 17 00:00:00 2001 From: mschubert Date: Fri, 29 Sep 2023 15:10:48 +0200 Subject: [PATCH] default unbounded (-1ms), don't mess with max time CRAN UBSAN error: https://www.stats.ox.ac.uk/pub/bdr/memtests/README.txt > test_check("clustermq") Loading required package: clustermq * Option 'clustermq.scheduler' not set, defaulting to 'LOCAL' --- see: https://mschubert.github.io/clustermq/articles/userguide.html#configuration /usr/local/gcc13/include/c++/13.2.0/bits/chrono.h:225:38: runtime error: signed integer overflow: 9223372036854775807 * 1000 cannot be represented in type 'long int' #0 0x7f0a455651e1 in std::chrono::duration > std::chrono::__duration_cast_impl >, std::ratio<1000l, 1l>, long, false, true>::__cast >(std::chrono::duration > const&) /usr/local/gcc13/include/c++/13.2.0/bits/chrono.h:225 #1 0x7f0a455651e1 in std::enable_if > >::value, std::chrono::duration > >::type std::chrono::duration_cast >, long, std::ratio<1l, 1l> >(std::chrono::duration > const&) /usr/local/gcc13/include/c++/13.2.0/bits/chrono.h:287 #2 0x7f0a455651e1 in std::chrono::duration >::duration, void>(std::chrono::duration > const&) /usr/local/gcc13/include/c++/13.2.0/bits/chrono.h:593 #3 0x7f0a455651e1 in CMQWorker::poll() /data/gannet/ripley/R/packages/tests-gcc-SAN/clustermq/src/CMQWorker.h:63 #4 0x7f0a4555612e in Rcpp::CppMethod0::operator()(CMQWorker*, SEXPREC**) /data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp/module/Module_generated_CppMethod.h:51 #5 0x7f0a45592804 in Rcpp::class_::invoke_void(SEXPREC*, SEXPREC*, SEXPREC**, int) /data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp/module/class.h:212 #6 0x7f0a468a1b3f in CppMethod__invoke_void(SEXPREC*) /tmp/RtmpSgVC44/R.INSTALL17fc5676a8ceff/Rcpp/src/module.cpp:200 --- src/CMQWorker.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMQWorker.h b/src/CMQWorker.h index 1060d55..b150860 100644 --- a/src/CMQWorker.h +++ b/src/CMQWorker.h @@ -60,7 +60,7 @@ class CMQWorker { int total_sock_ev = 0; do { try { - zmq::poll(pitems, std::chrono::duration::max()); + zmq::poll(pitems); } catch (zmq::error_t const &e) { if (errno != EINTR || pending_interrupt()) Rf_error(e.what());