* using log directory ‘/Users/ripley/R/packages/tests-SAN/cppRouting.Rcheck’ * using R Under development (unstable) (2026-10-30 r90804) * using platform: aarch64-apple-darwin27.2.0 * R was compiled by Apple clang version 21.0.0 (clang-2100.3.34.1) GNU Fortran (GCC) 14.2.0 * running under: macOS Golden Gate 27.2.1 * using session charset: UTF-8 * current time: 2026-11-10 11:52:39 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘cppRouting/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘cppRouting’ version ‘4.0’ * package encoding: UTF-8 * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package ‘cppRouting’ can be installed ... [98s/134s] OK * used C++ compiler: ‘Apple clang version 21.0.0 (clang-2100.4.1.1)’ * used SDK: ‘MacOSX27.3.sdk’ * checking package directory ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking pragmas in C/C++ headers and code ... OK * checking compilation flags used ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking tests ... ERROR Running ‘testthat.R’ Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(cppRouting) > > test_check("cppRouting") ================================================================= ==9327==ERROR: AddressSanitizer: container-overflow on address 0x602000070f98 at pc 0x0001103e2f60 bp 0x00016b2ce3f0 sp 0x00016b2ce3e8 READ of size 8 at 0x602000070f98 thread T37 #0 0x0001103e2f5c in distancePairCAdd::bidirmod(unsigned long, unsigned long) distance_pair.cpp:1243 #1 0x00011030eb1c in workerThread TinyThread.h:59 #2 0x000110313724 in tthread::thread::wrapper_function(void*) tinythread.h:863 #3 0x00010742de64 in asan_thread_start(void*)+0x4c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3de64) #4 0x00019036cce0 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6ce0) #5 0x000190367ccc in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1ccc) 0x602000070f98 is located 8 bytes inside of 16-byte region [0x602000070f90,0x602000070fa0) allocated by thread T37 here: #0 0x000107440150 in _Znwm+0x74 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x50150) #1 0x0001102cafd0 in std::__1::pair* std::__1::__libcpp_allocate[abi:nqe220106]>(std::__1::__element_count, unsigned long) allocate.h:60 #2 0x0001102cafd0 in std::__1::allocator>::allocate[abi:nqe220106](unsigned long) allocator.h:92 #3 0x0001102cafd0 in std::__1::__allocation_result>>::pointer, std::__1::allocator_traits>>::size_type> std::__1::__allocate_at_least[abi:nqe220106]>, std::__1::allocator_traits>>>(std::__1::allocator>&, unsigned long) allocate_at_least.h:46 #4 0x0001102cafd0 in std::__1::__split_buffer, std::__1::allocator>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator>&) __split_buffer:330 #5 0x0001102ca81c in std::__1::__split_buffer, std::__1::allocator>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator>&) __split_buffer:326 #6 0x0001102ca81c in std::__1::pair* std::__1::vector, std::__1::allocator>>::__emplace_back_slow_path>(std::__1::pair&&) vector.h:1107 #7 0x0001102ca198 in std::__1::pair& std::__1::vector, std::__1::allocator>>::emplace_back>(std::__1::pair&&)::'lambda0'()::operator()() const vector.h:1149 #8 0x0001102c9e2c in std::__1::pair& std::__1::vector, std::__1::allocator>>::emplace_back>(std::__1::pair&&) vector.h:1143 #9 0x0001102a7fe0 in std::__1::vector, std::__1::allocator>>::push_back[abi:nqe220106](std::__1::pair&&) vector.h:466 #10 0x0001102a7fe0 in std::__1::priority_queue, std::__1::vector, std::__1::allocator>>, comp>::push(std::__1::pair&&) queue:929 #11 0x0001103df1b4 in distancePairCAdd::bidirmod(unsigned long, unsigned long) distance_pair.cpp:1237 #12 0x00011030eb1c in workerThread TinyThread.h:59 #13 0x000110313724 in tthread::thread::wrapper_function(void*) tinythread.h:863 #14 0x00010742de64 in asan_thread_start(void*)+0x4c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3de64) #15 0x00019036cce0 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6ce0) #16 0x000190367ccc in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1ccc) Thread T37 created by T0 here: #0 0x00010742926c in pthread_create+0x60 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3926c) #1 0x000110313350 in tthread::thread::thread(void (*)(void*), void*) tinythread.h:906 #2 0x000110352040 in tthread::thread::thread(void (*)(void*), void*) tinythread.h:888 #3 0x000110352040 in RcppParallel::ttParallelFor(unsigned long, unsigned long, RcppParallel::Worker&, unsigned long) TinyThread.h:122 #4 0x0001104f4d44 in cppdistaddCmulti(std::__1::vector>&, std::__1::vector>&, std::__1::vector>&, Rcpp::Matrix<14, Rcpp::PreserveStorage>, std::__1::vector>&, std::__1::vector>&, std::__1::vector>&, int, std::__1::vector>&, std::__1::vector>&, std::__1::vector>&, std::__1::vector>&, bool, std::__1::vector>, std::__1::vector>) wrapper.cpp:620 #5 0x0001102664bc in _cppRouting_cppdistaddCmulti RcppExports.cpp:690 #6 0x000106296198 in R_doDotCall dotcode.c #7 0x0001064d8fa8 in bcEval_loop eval.c:8708 #8 0x000106481110 in bcEval eval.c:7537 #9 0x00010647f1a8 in Rf_eval eval.c:1167 #10 0x000106489754 in R_execClosure eval.c:2400 #11 0x000106484d54 in applyClosure_core eval.c:2316 #12 0x000106482ebc in Rf_applyClosure eval.c:2335 #13 0x00010647fbd0 in Rf_eval eval.c:1278 #14 0x0001064981fc in do_set eval.c:3587 #15 0x00010647f604 in Rf_eval eval.c:1230 #16 0x000106494008 in do_begin eval.c:3003 #17 0x00010647f604 in Rf_eval eval.c:1230 #18 0x00010649e38c in do_eval eval.c:3977 #19 0x0001064d588c in bcEval_loop eval.c:8154 #20 0x000106481110 in bcEval eval.c:7537 #21 0x00010647f1a8 in Rf_eval eval.c:1167 #22 0x000106489754 in R_execClosure eval.c:2400 #23 0x000106484d54 in applyClosure_core eval.c:2316 #24 0x000106482ebc in Rf_applyClosure eval.c:2335 #25 0x00010647fbd0 in Rf_eval eval.c:1278 #26 0x00010649e858 in do_eval eval.c:3995 #27 0x0001064d588c in bcEval_loop eval.c:8154 #28 0x000106481110 in bcEval eval.c:7537 #29 0x00010647f1a8 in Rf_eval eval.c:1167 #30 0x000106489754 in R_execClosure eval.c:2400 #31 0x000106484d54 in applyClosure_core eval.c:2316 #32 0x000106486b48 in Rf_applyClosure eval.c:2335 #33 0x000106486b48 in R_forceAndCall eval.c:2467 #34 0x000106091f80 in do_lapply apply.c:75 #35 0x00010665c3b8 in do_internal names.c:1425 #36 0x0001064c3d54 in bcEval_loop eval.c:8174 #37 0x000106481110 in bcEval eval.c:7537 #38 0x00010647f1a8 in Rf_eval eval.c:1167 #39 0x000106489754 in R_execClosure eval.c:2400 #40 0x000106484d54 in applyClosure_core eval.c:2316 #41 0x000106482ebc in Rf_applyClosure eval.c:2335 #42 0x00010647fbd0 in Rf_eval eval.c:1278 #43 0x0001065df74c in Rf_ReplIteration main.c:264 #44 0x0001065e3a5c in R_ReplConsole main.c:319 #45 0x0001065e3870 in run_Rmainloop main.c:1239 #46 0x0001065e3b58 in Rf_mainloop main.c:1246 #47 0x000104c455f0 in main Rmain.c:29 #48 0x000190298d78 in start+0x19f8 (dyld:arm64e+0x31d78) HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_container_overflow=0. If you suspect a false positive see also: https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow. SUMMARY: AddressSanitizer: container-overflow distance_pair.cpp:1243 in distancePairCAdd::bidirmod(unsigned long, unsigned long) Shadow bytes around the buggy address: 0x602000070d00: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fd 0x602000070d80: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fa 0x602000070e00: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fd 0x602000070e80: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fd 0x602000070f00: fa fa fd fa fa fa 00 00 fa fa fd fa fa fa fd fa =>0x602000070f80: fa fa fc[fc]fa fa fc fc fa fa fd fd fa fa fa fa 0x602000071000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x602000071080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x602000071100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x602000071180: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x602000071200: fa fa fa fa fa fa fa fa fa fa fd fd fa fa fd fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==9327==ABORTING * checking package vignettes ... OK * checking re-building of vignette outputs ... [11s/16s] OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR