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") ================================================================= ==3748292==ERROR: AddressSanitizer: heap-use-after-free on address 0x7eb62f9c96d0 at pc 0x7bf620720add bp 0x7ffe05f65360 sp 0x7ffe05f65358 READ of size 4 at 0x7eb62f9c96d0 thread T0 #0 0x7bf620720adc in Assignment::update_thetahat(arma::Col const&, arma::Cube const&) /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/Assignment.cpp:121:12 #1 0x7bf62071e9a3 in Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/Assignment.cpp:48:3 #2 0x7bf620765d93 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-clang-ASAN/nethist/src/multinethist_fastgreedy.cpp:24:14 #3 0x7bf62074376f in _nethist_multinethist_fastgreedy /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/RcppExports.cpp:39:34 #4 0x5614d9aa509e in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c #5 0x5614d9b69a8a in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704:21 #6 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #7 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #8 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #9 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #10 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #11 0x5614d9c5f144 in dispatchMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473:16 #12 0x5614d9c5dc54 in Rf_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513:10 #13 0x5614d9c603a4 in do_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579:9 #14 0x5614d9b63cf3 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170:15 #15 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #16 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #17 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #18 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #19 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #20 0x5614d9b50aa8 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278:12 #21 0x5614d9b5238a in forcePromise /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:976:13 #22 0x5614d9b7cf1d in getvar /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:5867:6 #23 0x5614d9b7cf1d in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7880:20 #24 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #25 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #26 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #27 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #28 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #29 0x5614d9b50aa8 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278:12 #30 0x5614d9ba9945 in do_set /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3585:8 #31 0x5614d9b505c0 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1230:12 #32 0x5614d9baed2a in do_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:3993:9 #33 0x5614d9b5e4ea in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8150:14 #34 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #35 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #36 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #37 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #38 0x5614d9ba14c4 in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #39 0x5614d9ba14c4 in R_forceAndCall /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2465:8 #40 0x5614d9956241 in do_lapply /data/localhost/ripley/R/svn/R-devel/src/main/apply.c:75:8 #41 0x5614d9c587b9 in do_internal /data/localhost/ripley/R/svn/R-devel/src/main/names.c:1425:11 #42 0x5614d9b63cf3 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170:15 #43 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #44 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #45 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #46 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #47 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #48 0x5614d9b50aa8 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278:12 #49 0x5614d9c21fb1 in Rf_ReplIteration /data/localhost/ripley/R/svn/R-devel/src/main/main.c:264:23 #50 0x5614d9c247e0 in R_ReplConsole /data/localhost/ripley/R/svn/R-devel/src/main/main.c:319:11 #51 0x5614d9c247e0 in run_Rmainloop /data/localhost/ripley/R/svn/R-devel/src/main/main.c:1239:5 #52 0x5614d9c24872 in Rf_mainloop /data/localhost/ripley/R/svn/R-devel/src/main/main.c:1246:5 #53 0x5614d9922a9c in main /data/localhost/ripley/R/svn/R-devel/src/main/Rmain.c:29:5 #54 0x7ff632c0a680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c) #55 0x7ff632c0a797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c) #56 0x5614d98327d4 in _start (/data/localhost/ripley/R/clang-ASAN/bin/exec/R+0x17d4) 0x7eb62f9c96d0 is located 5328 bytes inside of 28848-byte region [0x7eb62f9c8200,0x7eb62f9cf2b0) freed by thread T0 here: #0 0x5614d98e0876 in free /data/localhost/ripley/Sources/LLVM/23/latest/compiler-rt/lib/asan/asan_malloc_linux.cpp:51:3 #1 0x5614d9c3f64b in ReleaseLargeFreeVectors /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1167:7 #2 0x5614d9c3f64b in RunGenCollect /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1953:5 #3 0x5614d9c3250b in R_gc_internal /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:3240:19 #4 0x5614d9c2c8e4 in Rf_allocVector3 /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2713:3 #5 0x5614d99f0263 in Rf_allocVector /data/localhost/ripley/R/svn/R-devel/src/include/Rinlinedfuns.h:609:12 #6 0x5614d99f0263 in coerceToReal /data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:564:19 #7 0x5614d99ec06a in Rf_coerceVector /data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:1289:12 #8 0x7bf6207490e6 in SEXPREC* Rcpp::internal::basic_cast<14>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/r_cast.h:66:24 #9 0x7bf620789ee3 in SEXPREC* Rcpp::internal::r_true_cast<14>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/r_cast.h:90:20 #10 0x7bf620789ee3 in SEXPREC* Rcpp::r_cast<14>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/r_cast.h:170:20 #11 0x7bf620789ee3 in unsigned int Rcpp::internal::primitive_as(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/as.h:36:28 #12 0x7bf620779ec9 in unsigned int Rcpp::internal::as(SEXPREC*, Rcpp::traits::r_type_primitive_tag) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/as.h:43:20 #13 0x7bf620779ec9 in unsigned int Rcpp::as(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/as.h:151:16 #14 0x7bf620779ec9 in sample_node_by_swap_rule(int const&, int const&) /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/nethist_utils.cpp:31:12 #15 0x7bf620779a61 in select_swap(Assignment const&, int const&, int const&) /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/nethist_utils.cpp:13:32 #16 0x7bf62071e868 in Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/Assignment.cpp:43:27 #17 0x7bf620765d93 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-clang-ASAN/nethist/src/multinethist_fastgreedy.cpp:24:14 #18 0x7bf62074376f in _nethist_multinethist_fastgreedy /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/RcppExports.cpp:39:34 #19 0x5614d9aa509e in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c #20 0x5614d9b69a8a in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704:21 #21 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #22 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #23 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #24 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #25 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #26 0x5614d9c5f144 in dispatchMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473:16 #27 0x5614d9c5dc54 in Rf_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513:10 #28 0x5614d9c603a4 in do_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579:9 #29 0x5614d9b63cf3 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170:15 #30 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #31 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #32 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #33 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #34 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #35 0x5614d9b50aa8 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278:12 previously allocated by thread T0 here: #0 0x5614d98e0e44 in malloc /data/localhost/ripley/Sources/LLVM/23/latest/compiler-rt/lib/asan/asan_malloc_linux.cpp:109:3 #1 0x5614d9c2cffd in Rf_allocVector3 /data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2897:7 #2 0x5614d99ef764 in Rf_allocVector /data/localhost/ripley/R/svn/R-devel/src/include/Rinlinedfuns.h:609:12 #3 0x5614d99ef764 in coerceToInteger /data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:511:19 #4 0x5614d99ec0ab in Rf_coerceVector /data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:1287:12 #5 0x7bf62074fb26 in SEXPREC* Rcpp::internal::basic_cast<13>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/r_cast.h:66:24 #6 0x7bf620756441 in SEXPREC* Rcpp::internal::r_true_cast<13>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/r_cast.h:86:20 #7 0x7bf620756441 in SEXPREC* Rcpp::r_cast<13>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/r_cast.h:170:20 #8 0x7bf620756441 in Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/vector/Vector.h:74:25 #9 0x7bf62075554b in Rcpp::traits::Exporter>::Exporter(SEXPREC*) /data/localhost/ripley/R/test-clang/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloAs.h:465:28 #10 0x7bf62075554b in arma::Cube Rcpp::internal::as>(SEXPREC*, Rcpp::traits::r_type_generic_tag) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/as.h:86:41 #11 0x7bf62074365b in arma::Cube Rcpp::as>(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/as.h:151:16 #12 0x7bf62074365b in Rcpp::ConstReferenceInputParameter>::ConstReferenceInputParameter(SEXPREC*) /data/localhost/ripley/R/test-clang/Rcpp/include/Rcpp/InputParameter.h:72:54 #13 0x7bf62074365b in _nethist_multinethist_fastgreedy /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/RcppExports.cpp:32:63 #14 0x5614d9aa509e in R_doDotCall /data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c #15 0x5614d9b69a8a in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704:21 #16 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #17 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #18 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #19 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #20 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #21 0x5614d9c5f144 in dispatchMethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473:16 #22 0x5614d9c5dc54 in Rf_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:513:10 #23 0x5614d9c603a4 in do_usemethod /data/localhost/ripley/R/svn/R-devel/src/main/objects.c:579:9 #24 0x5614d9b63cf3 in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8170:15 #25 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #26 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #27 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 #28 0x5614d9b979d8 in applyClosure_core /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314:16 #29 0x5614d9b5313e in Rf_applyClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333:16 #30 0x5614d9b50aa8 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1278:12 #31 0x5614d9b5238a in forcePromise /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:976:13 #32 0x5614d9b7cf1d in getvar /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:5867:6 #33 0x5614d9b7cf1d in bcEval_loop /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7880:20 #34 0x5614d9b51af4 in bcEval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533:16 #35 0x5614d9b50081 in Rf_eval /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167:8 #36 0x5614d9b9881c in R_execClosure /data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398:39 SUMMARY: AddressSanitizer: heap-use-after-free /data/localhost/ripley/R/packages/tests-clang-ASAN/nethist/src/Assignment.cpp:121:12 in Assignment::update_thetahat(arma::Col const&, arma::Cube const&) Shadow bytes around the buggy address: 0x7eb62f9c9400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9600: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x7eb62f9c9680: fd fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd 0x7eb62f9c9700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9780: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9800: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x7eb62f9c9900: 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 ==3748292==ABORTING