* using log directory ‘/Users/ripley/R/packages/tests-SAN/nethist.Rcheck’ * using R Under development (unstable) (2026-09-14 r90538) * using platform: aarch64-apple-darwin27.0.0 * R was compiled by Apple clang version 21.0.0 (clang-2100.3.34.2) GNU Fortran (GCC) 14.2.0 * running under: macOS Golden Gate 27.0.1 * using session charset: UTF-8 * current time: 2026-10-24 06:47:10 UTC * using option ‘--no-stop-on-test-error’ * checking for file ‘nethist/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘nethist’ version ‘1.1.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 ‘nethist’ can be installed ... [45s/45s] OK * used C++ compiler: ‘Apple clang version 21.0.0 (clang-2100.3.34.1)’ * used SDK: ‘MacOSX27.2.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: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(nethist) > > test_check("nethist") ================================================================= ==38684==ERROR: AddressSanitizer: heap-use-after-free on address 0x62c0005eb4d0 at pc 0x000110bedd34 bp 0x00016f61ec50 sp 0x00016f61ec48 READ of size 4 at 0x62c0005eb4d0 thread T0 #0 0x000110bedd30 in Assignment::update_thetahat(arma::Col const&, arma::Cube const&) Assignment.cpp:121 #1 0x000110be83ac in Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) Assignment.cpp:48 #2 0x000110c481b4 in multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) multinethist_fastgreedy.cpp:24 #3 0x000110c1a69c in _nethist_multinethist_fastgreedy RcppExports.cpp:39 #4 0x000101f2d3e4 in R_doDotCall dotcode.c:775 #5 0x00010217bfc8 in bcEval_loop eval.c:8704 #6 0x000102124268 in bcEval eval.c:7533 #7 0x000102122300 in Rf_eval eval.c:1167 #8 0x00010212c8ac in R_execClosure eval.c:2398 #9 0x000102127eac in applyClosure_core eval.c:2314 #10 0x000102126014 in Rf_applyClosure eval.c:2333 #11 0x000102308d10 in dispatchMethod objects.c:473 #12 0x000102306ab4 in Rf_usemethod objects.c:513 #13 0x000102309f9c in do_usemethod objects.c:579 #14 0x000102166d74 in bcEval_loop eval.c:8170 #15 0x000102124268 in bcEval eval.c:7533 #16 0x000102122300 in Rf_eval eval.c:1167 #17 0x00010212c8ac in R_execClosure eval.c:2398 #18 0x000102127eac in applyClosure_core eval.c:2314 #19 0x000102126014 in Rf_applyClosure eval.c:2333 #20 0x000102122d28 in Rf_eval eval.c:1278 #21 0x0001021246b8 in forcePromise eval.c:976 #22 0x0001021e005c in getvar eval.c:5867 #23 0x000102199d68 in bcEval_loop eval.c:7880 #24 0x000102124268 in bcEval eval.c:7533 #25 0x000102122300 in Rf_eval eval.c:1167 #26 0x00010212c8ac in R_execClosure eval.c:2398 #27 0x000102127eac in applyClosure_core eval.c:2314 #28 0x000102126014 in Rf_applyClosure eval.c:2333 #29 0x000102122d28 in Rf_eval eval.c:1278 #30 0x00010213b324 in do_set eval.c:3585 #31 0x00010212275c in Rf_eval eval.c:1230 #32 0x000102141980 in do_eval eval.c:3993 #33 0x0001021788ac in bcEval_loop eval.c:8150 #34 0x000102124268 in bcEval eval.c:7533 #35 0x000102122300 in Rf_eval eval.c:1167 #36 0x00010212c8ac in R_execClosure eval.c:2398 #37 0x000102127eac in applyClosure_core eval.c:2314 #38 0x000102129ca0 in Rf_applyClosure eval.c:2333 #39 0x000102129ca0 in R_forceAndCall eval.c:2465 #40 0x000101d35fa8 in do_lapply apply.c:75 #41 0x0001022fef78 in do_internal names.c:1425 #42 0x000102166d74 in bcEval_loop eval.c:8170 #43 0x000102124268 in bcEval eval.c:7533 #44 0x000102122300 in Rf_eval eval.c:1167 #45 0x00010212c8ac in R_execClosure eval.c:2398 #46 0x000102127eac in applyClosure_core eval.c:2314 #47 0x000102126014 in Rf_applyClosure eval.c:2333 #48 0x000102122d28 in Rf_eval eval.c:1278 #49 0x00010228262c in Rf_ReplIteration main.c:264 #50 0x00010228693c in R_ReplConsole main.c:319 #51 0x000102286750 in run_Rmainloop main.c:1239 #52 0x000102286a38 in Rf_mainloop main.c:1246 #53 0x0001007d15f0 in main Rmain.c:29 #54 0x000193497e7c in start+0x1a1c (dyld:arm64e+0x31e7c) 0x62c0005eb4d0 is located 13008 bytes inside of 28848-byte region [0x62c0005e8200,0x62c0005ef2b0) freed by thread T0 here: #0 0x0001030d1368 in free+0x7c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x41368) #1 0x0001022e6784 in ReleaseLargeFreeVectors memory.c:1167 #2 0x0001022e6784 in RunGenCollect memory.c:1953 #3 0x00010229e874 in R_gc_internal memory.c:3240 #4 0x0001022a5354 in Rf_allocVector3 memory.c:2713 #5 0x000110c78e2c in void Rcpp::Vector<13, Rcpp::PreserveStorage>::import_sugar_expression>>(Rcpp::VectorBase<13, true, Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>>> const&, Rcpp::traits::integral_constant) Vector.h:1082 #6 0x000110c78cf8 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector>>(Rcpp::VectorBase<13, true, Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>>> const&) Vector.h:165 #7 0x000110c59e50 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector>>(Rcpp::VectorBase<13, true, Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>>> const&) Vector.h:163 #8 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_range_sugar_expression>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) Vector.h:33 #9 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch_unknown_iterable__logical>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) wrap.h:552 #10 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch_unknown_iterable__matrix_interface>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) wrap.h:559 #11 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch_unknown_iterable>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) wrap.h:661 #12 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch_unknown>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) wrap.h:732 #13 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch_eigen>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) wrap.h:770 #14 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch_unknown_importable>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::integral_constant) wrap.h:787 #15 0x000110c59e50 in SEXPREC* Rcpp::internal::wrap_dispatch>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&, Rcpp::traits::wrap_type_unknown_tag) wrap.h:807 #16 0x000110c59e50 in SEXPREC* Rcpp::wrap>>(Rcpp::sugar::Minus_Vector_Primitive<13, true, Rcpp::Vector<13, Rcpp::PreserveStorage>> const&) wrap_end.h:30 #17 0x000110c59e50 in sample_node_by_swap_rule(int const&, int const&) nethist_utils.cpp:31 #18 0x000110c59990 in select_swap(Assignment const&, int const&, int const&) nethist_utils.cpp:13 #19 0x000110be817c in Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) Assignment.cpp:43 #20 0x000110c481b4 in multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) multinethist_fastgreedy.cpp:24 #21 0x000110c1a69c in _nethist_multinethist_fastgreedy RcppExports.cpp:39 #22 0x000101f2d3e4 in R_doDotCall dotcode.c:775 #23 0x00010217bfc8 in bcEval_loop eval.c:8704 #24 0x000102124268 in bcEval eval.c:7533 #25 0x000102122300 in Rf_eval eval.c:1167 #26 0x00010212c8ac in R_execClosure eval.c:2398 #27 0x000102127eac in applyClosure_core eval.c:2314 #28 0x000102126014 in Rf_applyClosure eval.c:2333 #29 0x000102308d10 in dispatchMethod objects.c:473 #30 0x000102306ab4 in Rf_usemethod objects.c:513 #31 0x000102309f9c in do_usemethod objects.c:579 #32 0x000102166d74 in bcEval_loop eval.c:8170 #33 0x000102124268 in bcEval eval.c:7533 #34 0x000102122300 in Rf_eval eval.c:1167 #35 0x00010212c8ac in R_execClosure eval.c:2398 #36 0x000102127eac in applyClosure_core eval.c:2314 #37 0x000102126014 in Rf_applyClosure eval.c:2333 #38 0x000102122d28 in Rf_eval eval.c:1278 #39 0x0001021246b8 in forcePromise eval.c:976 #40 0x0001021e005c in getvar eval.c:5867 previously allocated by thread T0 here: #0 0x0001030d1274 in malloc+0x78 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x41274) #1 0x0001022a5c1c in Rf_allocVector3 memory.c:2897 #2 0x000101e1c7b4 in Rf_allocVector Rinlinedfuns.h:609 #3 0x000101e1c7b4 in coerceToInteger coerce.c:511 #4 0x000101e17810 in Rf_coerceVector coerce.c:1287 #5 0x000110c2f9ec in SEXPREC* Rcpp::internal::basic_cast<13>(SEXPREC*) r_cast.h:66 #6 0x000110c35124 in SEXPREC* Rcpp::internal::r_true_cast<13>(SEXPREC*) r_cast.h:86 #7 0x000110c35124 in SEXPREC* Rcpp::r_cast<13>(SEXPREC*) r_cast.h:170 #8 0x000110c35124 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector(SEXPREC*) Vector.h:74 #9 0x000110c1a5c0 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector(SEXPREC*) Vector.h:72 #10 0x000110c1a5c0 in Rcpp::traits::Exporter>::Exporter(SEXPREC*) RcppArmadilloAs.h:465 #11 0x000110c1a5c0 in Rcpp::traits::Exporter>::Exporter(SEXPREC*) RcppArmadilloAs.h:465 #12 0x000110c1a5c0 in arma::Cube Rcpp::internal::as>(SEXPREC*, Rcpp::traits::r_type_generic_tag) as.h:86 #13 0x000110c1a5c0 in arma::Cube Rcpp::as>(SEXPREC*) as.h:151 #14 0x000110c1a5c0 in Rcpp::ConstReferenceInputParameter>::ConstReferenceInputParameter(SEXPREC*) InputParameter.h:72 #15 0x000110c1a5c0 in Rcpp::ConstReferenceInputParameter>::ConstReferenceInputParameter(SEXPREC*) InputParameter.h:72 #16 0x000110c1a5c0 in _nethist_multinethist_fastgreedy RcppExports.cpp:32 #17 0x000101f2d3e4 in R_doDotCall dotcode.c:775 #18 0x00010217bfc8 in bcEval_loop eval.c:8704 #19 0x000102124268 in bcEval eval.c:7533 #20 0x000102122300 in Rf_eval eval.c:1167 #21 0x00010212c8ac in R_execClosure eval.c:2398 #22 0x000102127eac in applyClosure_core eval.c:2314 #23 0x000102126014 in Rf_applyClosure eval.c:2333 #24 0x000102308d10 in dispatchMethod objects.c:473 #25 0x000102306ab4 in Rf_usemethod objects.c:513 #26 0x000102309f9c in do_usemethod objects.c:579 #27 0x000102166d74 in bcEval_loop eval.c:8170 #28 0x000102124268 in bcEval eval.c:7533 #29 0x000102122300 in Rf_eval eval.c:1167 #30 0x00010212c8ac in R_execClosure eval.c:2398 #31 0x000102127eac in applyClosure_core eval.c:2314 #32 0x000102126014 in Rf_applyClosure eval.c:2333 #33 0x000102122d28 in Rf_eval eval.c:1278 #34 0x0001021246b8 in forcePromise eval.c:976 #35 0x0001021e005c in getvar eval.c:5867 #36 0x000102199d68 in bcEval_loop eval.c:7880 #37 0x000102124268 in bcEval eval.c:7533 #38 0x000102122300 in Rf_eval eval.c:1167 #39 0x00010212c8ac in R_execClosure eval.c:2398 SUMMARY: AddressSanitizer: heap-use-after-free Assignment.cpp:121 in Assignment::update_thetahat(arma::Col const&, arma::Cube const&) Shadow bytes around the buggy address: 0x62c0005eb200: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb280: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb300: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb380: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x62c0005eb480: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd 0x62c0005eb500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb600: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x62c0005eb700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 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 ==38684==ABORTING * checking package vignettes ... OK * checking re-building of vignette outputs ... [18s/24s] OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR