R Under development (unstable) (2026-10-23 r90760) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # 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") ================================================================= ==3152495==ERROR: AddressSanitizer: heap-use-after-free on address 0x7e6eea3c8d70 at pc 0x7baed865b5cb bp 0x7ffdd3d6d610 sp 0x7ffdd3d6d608 READ of size 4 at 0x7e6eea3c8d70 thread T0 #0 0x7baed865b5ca in Assignment::update_thetahat(arma::Col const&, arma::Cube const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/Assignment.cpp:121 #1 0x7baed86aa26d in Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/Assignment.cpp:48 #2 0x7baed8723537 in multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/multinethist_fastgreedy.cpp:24 #3 0x7baed86f5261 in _nethist_multinethist_fastgreedy /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/RcppExports.cpp:39 #4 0x00000075e820 in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:775 #5 0x0000009036c7 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704 #6 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #7 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #8 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #9 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #10 0x000000abf856 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #11 0x000000abf856 in applyMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:120 #12 0x000000ac3333 in dispatchMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473 #13 0x000000ac52e5 in Rf_usemethod.isra.0 /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513 #14 0x000000ac60a3 in do_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579 #15 0x0000008f98dc in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170 #16 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #17 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #18 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #19 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #20 0x000000879058 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #21 0x000000879058 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278 #22 0x000000946aaa in forcePromise.part.0.lto_priv.0 /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:976 #23 0x0000008c2ccf in forcePromise /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:956 #24 0x0000008c2ccf in getvar /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:5867 #25 0x0000008fcf64 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7880 #26 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #27 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #28 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #29 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #30 0x000000879058 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #31 0x000000879058 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278 #32 0x0000008ae3de in do_set /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3585 #33 0x000000879486 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1230 #34 0x0000008b7052 in do_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3993 #35 0x0000008efb6b in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8150 #36 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #37 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #38 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #39 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #40 0x000000897809 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #41 0x000000897809 in R_forceAndCall /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2465 #42 0x0000004a0207 in do_lapply /data/localhost/ripley/R/svn/R-devel/src/main/apply.c:75 #43 0x000000abe611 in do_internal /data/localhost/ripley/R/svn/R-devel/src/main/names.c:1425 #44 0x0000008f98dc in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170 #45 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #46 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #47 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #48 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #49 0x000000879058 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #50 0x000000879058 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278 #51 0x000000a24378 in Rf_ReplIteration /data/localhost/ripley/R/svn/R-devel/src/main/main.c:264 #52 0x000000a24378 in R_ReplConsole /data/localhost/ripley/R/svn/R-devel/src/main/main.c:319 #53 0x000000a4204a in run_Rmainloop /data/localhost/ripley/R/svn/R-devel/src/main/main.c:1239 #54 0x000000a420e2 in Rf_mainloop /data/localhost/ripley/R/svn/R-devel/src/main/main.c:1246 #55 0x0000004122ff in main /data/localhost/ripley/R/svn/R-devel/src/main/Rmain.c:29 #56 0x7faeed40a680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c) #57 0x7faeed40a797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c) #58 0x000000412cc4 in _start (/data/localhost/ripley/R/gcc-SAN3/bin/exec/R+0x412cc4) (BuildId: 4876d4617850707d9e70c2f8501e04b9a0625a9d) 0x7e6eea3c8d70 is located 2928 bytes inside of 28848-byte region [0x7e6eea3c8200,0x7e6eea3cf2b0) freed by thread T0 here: #0 0x7faeeecee4cf in free.part.0 (/lib64/libasan.so.8+0xee4cf) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079) #1 0x000000a275e7 in ReleaseLargeFreeVectors /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1167 #2 0x000000a52587 in RunGenCollect /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1953 #3 0x000000a8fb42 in R_gc_internal /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:3240 #4 0x000000a91ba8 in Rf_cons /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2491 #5 0x7baedfadf847 in Rcpp::Rcpp_precious_preserve(SEXPREC*) /tmp/RtmpoDQdLN/R.INSTALL87ae2abf596e/Rcpp/src/barrier.cpp:115 #6 0x7baed87427d7 in Rcpp::no_init_vector::operator Rcpp::Vector<13, Rcpp::PreserveStorage><13, Rcpp::PreserveStorage>() const /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/no_init.h:43 #7 0x7baed87427d7 in Rcpp::sugar::EmpiricalSample(int, int, bool, bool) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/sugar/functions/sample.h:339 #8 0x7baed87427d7 in Rcpp::sample(int, int, bool, Rcpp::Nullable >, bool) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/sugar/functions/sample.h:432 #9 0x7baed87427d7 in sample_node_by_swap_rule(int const&, int const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/nethist_utils.cpp:31 #10 0x7baed87456a1 in select_swap(Assignment const&, int const&, int const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/nethist_utils.cpp:11 #11 0x7baed86a9deb in Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/Assignment.cpp:43 #12 0x7baed8723537 in multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/multinethist_fastgreedy.cpp:24 #13 0x7baed86f5261 in _nethist_multinethist_fastgreedy /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/RcppExports.cpp:39 #14 0x00000075e820 in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:775 #15 0x0000009036c7 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704 #16 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #17 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #18 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #19 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #20 0x000000abf856 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #21 0x000000abf856 in applyMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:120 #22 0x000000ac3333 in dispatchMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473 #23 0x000000ac52e5 in Rf_usemethod.isra.0 /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513 #24 0x000000ac60a3 in do_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579 #25 0x0000008f98dc in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170 #26 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #27 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #28 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #29 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #30 0x000000879058 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #31 0x000000879058 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278 #32 0x000000946aaa in forcePromise.part.0.lto_priv.0 /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:976 #33 0x0000008c2ccf in forcePromise /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:956 #34 0x0000008c2ccf in getvar /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:5867 #35 0x0000008fcf64 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7880 previously allocated by thread T0 here: #0 0x7faeeecef41f in malloc (/lib64/libasan.so.8+0xef41f) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079) #1 0x000000a93c60 in Rf_allocVector3 /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2897 #2 0x0000005f2a69 in Rf_allocVector /data/localhost/ripley/R/svn/R-devel/src/include/Rinlinedfuns.h:609 #3 0x0000005f2a69 in coerceToInteger /data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:511 #4 0x0000005ff508 in Rf_coerceVector /data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:1287 #5 0x7baed86eb691 in SEXPREC* Rcpp::internal::basic_cast<13>(SEXPREC*) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:66 #6 0x7baed86eb950 in SEXPREC* Rcpp::internal::r_true_cast<13>(SEXPREC*) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:86 #7 0x7baed86eb950 in SEXPREC* Rcpp::r_cast<13>(SEXPREC*) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:170 #8 0x7baed86eb950 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector(SEXPREC*) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:74 #9 0x7baed86f4fd1 in Rcpp::traits::Exporter >::Exporter(SEXPREC*) /data/localhost/ripley/R/test-dev/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloAs.h:465 #10 0x7baed86f4fd1 in arma::Cube Rcpp::internal::as >(SEXPREC*, Rcpp::traits::r_type_generic_tag) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/as.h:86 #11 0x7baed86f4fd1 in arma::Cube Rcpp::as >(SEXPREC*) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/as.h:151 #12 0x7baed86f4fd1 in Rcpp::ConstReferenceInputParameter >::ConstReferenceInputParameter(SEXPREC*) /data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/InputParameter.h:72 #13 0x7baed86f4fd1 in _nethist_multinethist_fastgreedy /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/RcppExports.cpp:32 #14 0x00000075e820 in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:775 #15 0x0000009036c7 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704 #16 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #17 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #18 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #19 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #20 0x000000abf856 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #21 0x000000abf856 in applyMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:120 #22 0x000000ac3333 in dispatchMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473 #23 0x000000ac52e5 in Rf_usemethod.isra.0 /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513 #24 0x000000ac60a3 in do_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579 #25 0x0000008f98dc in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170 #26 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #27 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #28 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #29 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 #30 0x000000879058 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333 #31 0x000000879058 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278 #32 0x000000946aaa in forcePromise.part.0.lto_priv.0 /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:976 #33 0x0000008c2ccf in forcePromise /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:956 #34 0x0000008c2ccf in getvar /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:5867 #35 0x0000008fcf64 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7880 #36 0x0000008daa7b in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533 #37 0x0000008789aa in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167 #38 0x000000891d9a in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398 #39 0x000000895a9d in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314 SUMMARY: AddressSanitizer: heap-use-after-free /data/localhost/ripley/R/packages/tests-gcc-SAN/nethist/src/Assignment.cpp:121 in Assignment::update_thetahat(arma::Col const&, arma::Cube const&) Shadow bytes around the buggy address: 0x7e6eea3c8a80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8b00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8b80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8c00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8c80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x7e6eea3c8d00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd[fd]fd 0x7e6eea3c8d80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8e00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8e80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8f00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7e6eea3c8f80: 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 ==3152495==ABORTING