==627438== Memcheck, a memory error detector ==627438== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al. ==627438== Using Valgrind-3.27.1 and LibVEX; rerun with -h for copyright info ==627438== Command: /data/localhost/ripley/R/R-devel-vg/bin/exec/R -f testthat.R --restore --save --no-readline --vanilla ==627438== 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") ==627438== Invalid read of size 4 ==627438== at 0x1FAE632B: Assignment::update_thetahat(arma::Col const&, arma::Cube const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/Assignment.cpp:121) ==627438== by 0x1FAE785D: Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/Assignment.cpp:48) ==627438== by 0x1FAFF3FB: multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/multinethist_fastgreedy.cpp:24) ==627438== by 0x1FAF2616: _nethist_multinethist_fastgreedy (/data/localhost/ripley/R/packages/tests-vg/nethist/src/RcppExports.cpp:39) ==627438== by 0x4972E7: R_doDotCall (/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:780) ==627438== by 0x4D545A: bcEval_loop (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7518) ==627438== by 0x4E4CCA: Rf_eval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167) ==627438== by 0x4E6B66: R_execClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398) ==627438== by 0x4E78FF: applyClosure_core (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314) ==627438== by 0x4E83F1: Rf_applyClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333) ==627438== by 0x53272C: dispatchMethod (/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473) ==627438== Address 0x211d0d80 is 7,008 bytes inside a block of size 28,848 free'd ==627438== at 0x4844D73: free (/builddir/build/BUILD/valgrind-3.27.1-build/valgrind-3.27.1/coregrind/m_replacemalloc/vg_replace_malloc.c:950) ==627438== by 0x528117: ReleaseLargeFreeVectors (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1167) ==627438== by 0x528117: RunGenCollect (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1953) ==627438== by 0x528117: R_gc_internal (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:3240) ==627438== by 0x52A463: Rf_cons (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2491) ==627438== by 0x14EC4847: Rcpp::Rcpp_precious_preserve(SEXPREC*) (/tmp/RtmpoDQdLN/R.INSTALL87ae2abf596e/Rcpp/src/barrier.cpp:115) ==627438== by 0x1FB0835B: Rcpp_precious_preserve (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/routines.h:155) ==627438== by 0x1FB0835B: Rcpp_PreciousPreserve (/data/localhost/ripley/R/test-dev/Rcpp/include/RcppCommon.h:119) ==627438== by 0x1FB0835B: set__ (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/storage/PreserveStorage.h:43) ==627438== by 0x1FB0835B: import_sugar_expression > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:1082) ==627438== by 0x1FB0835B: Vector > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:165) ==627438== by 0x1FB0835B: wrap_range_sugar_expression > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/api/meat/Vector.h:33) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_iterable__logical > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:552) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_iterable__matrix_interface > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:559) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_iterable > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:661) ==627438== by 0x1FB0835B: wrap_dispatch_unknown > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:732) ==627438== by 0x1FB0835B: wrap_dispatch_eigen > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:770) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_importable > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:787) ==627438== by 0x1FB0835B: wrap_dispatch > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:807) ==627438== by 0x1FB0835B: wrap > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap_end.h:30) ==627438== by 0x1FB0835B: sample_node_by_swap_rule(int const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/nethist_utils.cpp:31) ==627438== by 0x1FB0933C: select_swap(Assignment const&, int const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/nethist_utils.cpp:13) ==627438== by 0x1FAE77EC: Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/Assignment.cpp:43) ==627438== by 0x1FAFF3FB: multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/multinethist_fastgreedy.cpp:24) ==627438== by 0x1FAF2616: _nethist_multinethist_fastgreedy (/data/localhost/ripley/R/packages/tests-vg/nethist/src/RcppExports.cpp:39) ==627438== by 0x4972E7: R_doDotCall (/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:780) ==627438== by 0x4D545A: bcEval_loop (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7518) ==627438== Block was alloc'd at ==627438== at 0x4841AE6: malloc (/builddir/build/BUILD/valgrind-3.27.1-build/valgrind-3.27.1/coregrind/m_replacemalloc/vg_replace_malloc.c:447) ==627438== by 0x52BE81: Rf_allocVector3 (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2897) ==627438== by 0x45A243: Rf_allocVector (/data/localhost/ripley/R/svn/R-devel/src/include/Rinlinedfuns.h:609) ==627438== by 0x45A243: coerceToInteger (/data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:511) ==627438== by 0x45A243: Rf_coerceVector (/data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:1287) ==627438== by 0x1FAF249C: r_true_cast<13> (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:86) ==627438== by 0x1FAF249C: r_cast<13> (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:170) ==627438== by 0x1FAF249C: Vector (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:74) ==627438== by 0x1FAF249C: Exporter (/data/localhost/ripley/R/test-dev/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloAs.h:465) ==627438== by 0x1FAF249C: as > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/as.h:86) ==627438== by 0x1FAF249C: as > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/as.h:151) ==627438== by 0x1FAF249C: ConstReferenceInputParameter (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/InputParameter.h:72) ==627438== by 0x1FAF249C: _nethist_multinethist_fastgreedy (/data/localhost/ripley/R/packages/tests-vg/nethist/src/RcppExports.cpp:32) ==627438== by 0x4972E7: R_doDotCall (/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:780) ==627438== by 0x4D545A: bcEval_loop (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7518) ==627438== by 0x4E4CCA: Rf_eval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167) ==627438== by 0x4E6B66: R_execClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398) ==627438== by 0x4E78FF: applyClosure_core (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314) ==627438== by 0x4E83F1: Rf_applyClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333) ==627438== by 0x53272C: dispatchMethod (/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473) ==627438== ==627438== Invalid read of size 4 ==627438== at 0x1FAE632F: Assignment::update_thetahat(arma::Col const&, arma::Cube const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/Assignment.cpp:121) ==627438== by 0x1FAE785D: Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/Assignment.cpp:48) ==627438== by 0x1FAFF3FB: multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/multinethist_fastgreedy.cpp:24) ==627438== by 0x1FAF2616: _nethist_multinethist_fastgreedy (/data/localhost/ripley/R/packages/tests-vg/nethist/src/RcppExports.cpp:39) ==627438== by 0x4972E7: R_doDotCall (/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:780) ==627438== by 0x4D545A: bcEval_loop (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7518) ==627438== by 0x4E4CCA: Rf_eval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167) ==627438== by 0x4E6B66: R_execClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398) ==627438== by 0x4E78FF: applyClosure_core (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314) ==627438== by 0x4E83F1: Rf_applyClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333) ==627438== by 0x53272C: dispatchMethod (/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473) ==627438== Address 0x211d1410 is 8,688 bytes inside a block of size 28,848 free'd ==627438== at 0x4844D73: free (/builddir/build/BUILD/valgrind-3.27.1-build/valgrind-3.27.1/coregrind/m_replacemalloc/vg_replace_malloc.c:950) ==627438== by 0x528117: ReleaseLargeFreeVectors (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1167) ==627438== by 0x528117: RunGenCollect (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:1953) ==627438== by 0x528117: R_gc_internal (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:3240) ==627438== by 0x52A463: Rf_cons (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2491) ==627438== by 0x14EC4847: Rcpp::Rcpp_precious_preserve(SEXPREC*) (/tmp/RtmpoDQdLN/R.INSTALL87ae2abf596e/Rcpp/src/barrier.cpp:115) ==627438== by 0x1FB0835B: Rcpp_precious_preserve (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/routines.h:155) ==627438== by 0x1FB0835B: Rcpp_PreciousPreserve (/data/localhost/ripley/R/test-dev/Rcpp/include/RcppCommon.h:119) ==627438== by 0x1FB0835B: set__ (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/storage/PreserveStorage.h:43) ==627438== by 0x1FB0835B: import_sugar_expression > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:1082) ==627438== by 0x1FB0835B: Vector > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:165) ==627438== by 0x1FB0835B: wrap_range_sugar_expression > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/api/meat/Vector.h:33) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_iterable__logical > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:552) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_iterable__matrix_interface > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:559) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_iterable > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:661) ==627438== by 0x1FB0835B: wrap_dispatch_unknown > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:732) ==627438== by 0x1FB0835B: wrap_dispatch_eigen > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:770) ==627438== by 0x1FB0835B: wrap_dispatch_unknown_importable > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:787) ==627438== by 0x1FB0835B: wrap_dispatch > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap.h:807) ==627438== by 0x1FB0835B: wrap > > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/internal/wrap_end.h:30) ==627438== by 0x1FB0835B: sample_node_by_swap_rule(int const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/nethist_utils.cpp:31) ==627438== by 0x1FB0933C: select_swap(Assignment const&, int const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/nethist_utils.cpp:13) ==627438== by 0x1FAE77EC: Assignment::create_proposal_from(Assignment const&, arma::Cube const&, int const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/Assignment.cpp:43) ==627438== by 0x1FAFF3FB: multinethist_fastgreedy(arma::Cube const&, int const&, arma::Col const&, int const&, int const&, int const&, bool const&) (/data/localhost/ripley/R/packages/tests-vg/nethist/src/multinethist_fastgreedy.cpp:24) ==627438== by 0x1FAF2616: _nethist_multinethist_fastgreedy (/data/localhost/ripley/R/packages/tests-vg/nethist/src/RcppExports.cpp:39) ==627438== by 0x4972E7: R_doDotCall (/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:780) ==627438== by 0x4D545A: bcEval_loop (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7518) ==627438== Block was alloc'd at ==627438== at 0x4841AE6: malloc (/builddir/build/BUILD/valgrind-3.27.1-build/valgrind-3.27.1/coregrind/m_replacemalloc/vg_replace_malloc.c:447) ==627438== by 0x52BE81: Rf_allocVector3 (/data/localhost/ripley/R/svn/R-devel/src/main/memory.c:2897) ==627438== by 0x45A243: Rf_allocVector (/data/localhost/ripley/R/svn/R-devel/src/include/Rinlinedfuns.h:609) ==627438== by 0x45A243: coerceToInteger (/data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:511) ==627438== by 0x45A243: Rf_coerceVector (/data/localhost/ripley/R/svn/R-devel/src/main/coerce.c:1287) ==627438== by 0x1FAF249C: r_true_cast<13> (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:86) ==627438== by 0x1FAF249C: r_cast<13> (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/r_cast.h:170) ==627438== by 0x1FAF249C: Vector (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/vector/Vector.h:74) ==627438== by 0x1FAF249C: Exporter (/data/localhost/ripley/R/test-dev/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloAs.h:465) ==627438== by 0x1FAF249C: as > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/as.h:86) ==627438== by 0x1FAF249C: as > (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/as.h:151) ==627438== by 0x1FAF249C: ConstReferenceInputParameter (/data/localhost/ripley/R/test-dev/Rcpp/include/Rcpp/InputParameter.h:72) ==627438== by 0x1FAF249C: _nethist_multinethist_fastgreedy (/data/localhost/ripley/R/packages/tests-vg/nethist/src/RcppExports.cpp:32) ==627438== by 0x4972E7: R_doDotCall (/data/localhost/ripley/R/svn/R-devel/src/main/dotcode.c:780) ==627438== by 0x4D545A: bcEval_loop (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:8704) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7533) ==627438== by 0x4E4901: bcEval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:7518) ==627438== by 0x4E4CCA: Rf_eval (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:1167) ==627438== by 0x4E6B66: R_execClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2398) ==627438== by 0x4E78FF: applyClosure_core (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2314) ==627438== by 0x4E83F1: Rf_applyClosure (/data/localhost/ripley/R/svn/R-devel/src/main/eval.c:2333) ==627438== by 0x53272C: dispatchMethod (/data/localhost/ripley/R/svn/R-devel/src/main/objects.c:473) ==627438== [ FAIL 0 | WARN 0 | SKIP 1 | PASS 327 ] ══ Skipped tests (1) ═══════════════════════════════════════════════════════════ • empty test (1): [ FAIL 0 | WARN 0 | SKIP 1 | PASS 327 ] > > proc.time() user system elapsed 2296.458 11.659 2462.022 ==627438== ==627438== HEAP SUMMARY: ==627438== in use at exit: 408,414,267 bytes in 79,411 blocks ==627438== total heap usage: 2,254,715 allocs, 2,175,304 frees, 4,428,396,810 bytes allocated ==627438== ==627438== LEAK SUMMARY: ==627438== definitely lost: 0 bytes in 0 blocks ==627438== indirectly lost: 0 bytes in 0 blocks ==627438== possibly lost: 0 bytes in 0 blocks ==627438== still reachable: 408,414,267 bytes in 79,411 blocks ==627438== suppressed: 0 bytes in 0 blocks ==627438== Reachable blocks (those to which a pointer was found) are not shown. ==627438== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==627438== ==627438== For lists of detected and suppressed errors, rerun with: -s ==627438== ERROR SUMMARY: 5883288 errors from 2 contexts (suppressed: 0 from 0)