==2040226== Memcheck, a memory error detector ==2040226== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==2040226== Using Valgrind-3.24.0 and LibVEX; rerun with -h for copyright info ==2040226== Command: /data/blackswan/ripley/R/R-devel-vg/bin/exec/R -f testthat.R --restore --save --no-readline --vanilla ==2040226== R Under development (unstable) (2026-03-12 r89611) -- "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. > library(testthat) > library(iglm) Loading required package: RcppProgress > > test_check("iglm") 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| ==2040226== Invalid read of size 1 ==2040226== at 0x24865299: get_val (packages/tests-vg/iglm/src/../inst/include/iglm/network_class.h:160) ==2040226== by 0x24865299: initialize_overlap_counts (packages/tests-vg/iglm/src/../inst/include/iglm/xz_class.h:163) ==2040226== by 0x24865299: XZ_class::XZ_class(int, bool, arma::Mat, arma::Col, arma::Mat, arma::Mat, std::__cxx11::basic_string, std::allocator >, double) (packages/tests-vg/iglm/src/../inst/include/iglm/xz_class.h:137) ==2040226== by 0x248655D2: XYZ_class::XYZ_class(int, bool, arma::Col, arma::Col, arma::Mat, arma::Mat, arma::Mat, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/../inst/include/iglm/xyz_class.h:34) ==2040226== by 0x24838B49: xyz_count_global(arma::Mat const&, arma::Col const&, arma::Col const&, arma::Mat const&, arma::Mat const&, bool, std::vector, std::allocator >, std::allocator, std::allocator > > >, int, std::vector, std::allocator > >&, std::vector >&, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/xyz_sampling.cpp:224) ==2040226== by 0x247FB1E4: _iglm_xyz_count_global (R-devel/site-library/Rcpp/include/Rcpp/as.h:43) ==2040226== by 0x4A7E79: R_doDotCall (svn/R-devel/src/main/dotcode.c:813) ==2040226== by 0x4E2103: bcEval_loop (svn/R-devel/src/main/eval.c:8682) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7515) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7500) ==2040226== by 0x4F258A: Rf_eval (svn/R-devel/src/main/eval.c:1167) ==2040226== by 0x4F430D: R_execClosure (svn/R-devel/src/main/eval.c:2389) ==2040226== by 0x4F4FC6: applyClosure_core (svn/R-devel/src/main/eval.c:2302) ==2040226== by 0x4F2695: Rf_applyClosure (svn/R-devel/src/main/eval.c:2324) ==2040226== by 0x4F2695: Rf_eval (svn/R-devel/src/main/eval.c:1280) ==2040226== by 0x4F735C: do_set (svn/R-devel/src/main/eval.c:3581) ==2040226== Address 0x1547143d is 3 bytes before a block of size 9 alloc'd ==2040226== at 0x4843FEC: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.24.0/coregrind/m_replacemalloc/vg_replace_malloc.c:487) ==2040226== by 0x24860B92: allocate (/usr/include/c++/14/bits/new_allocator.h:151) ==2040226== by 0x24860B92: allocate (/usr/include/c++/14/bits/alloc_traits.h:478) ==2040226== by 0x24860B92: _M_allocate (/usr/include/c++/14/bits/stl_vector.h:380) ==2040226== by 0x24860B92: _M_create_storage (/usr/include/c++/14/bits/stl_vector.h:398) ==2040226== by 0x24860B92: _Vector_base (/usr/include/c++/14/bits/stl_vector.h:334) ==2040226== by 0x24860B92: vector (/usr/include/c++/14/bits/stl_vector.h:571) ==2040226== by 0x24860B92: std::vector >::_M_fill_assign(unsigned long, char const&) (/usr/include/c++/14/bits/vector.tcc:278) ==2040226== by 0x24864C80: assign (/usr/include/c++/14/bits/stl_vector.h:809) ==2040226== by 0x24864C80: Network (packages/tests-vg/iglm/src/../inst/include/iglm/network_class.h:46) ==2040226== by 0x24864C80: XZ_class::XZ_class(int, bool, arma::Mat, arma::Col, arma::Mat, arma::Mat, std::__cxx11::basic_string, std::allocator >, double) (packages/tests-vg/iglm/src/../inst/include/iglm/xz_class.h:117) ==2040226== by 0x248655D2: XYZ_class::XYZ_class(int, bool, arma::Col, arma::Col, arma::Mat, arma::Mat, arma::Mat, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/../inst/include/iglm/xyz_class.h:34) ==2040226== by 0x24838B49: xyz_count_global(arma::Mat const&, arma::Col const&, arma::Col const&, arma::Mat const&, arma::Mat const&, bool, std::vector, std::allocator >, std::allocator, std::allocator > > >, int, std::vector, std::allocator > >&, std::vector >&, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/xyz_sampling.cpp:224) ==2040226== by 0x247FB1E4: _iglm_xyz_count_global (R-devel/site-library/Rcpp/include/Rcpp/as.h:43) ==2040226== by 0x4A7E79: R_doDotCall (svn/R-devel/src/main/dotcode.c:813) ==2040226== by 0x4E2103: bcEval_loop (svn/R-devel/src/main/eval.c:8682) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7515) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7500) ==2040226== by 0x4F258A: Rf_eval (svn/R-devel/src/main/eval.c:1167) ==2040226== by 0x4F430D: R_execClosure (svn/R-devel/src/main/eval.c:2389) ==2040226== by 0x4F4FC6: applyClosure_core (svn/R-devel/src/main/eval.c:2302) ==2040226== ==2040226== Invalid read of size 1 ==2040226== at 0x24863198: get_val (packages/tests-vg/iglm/src/../inst/include/iglm/network_class.h:160) ==2040226== by 0x24863198: initialize_overlap_counts (packages/tests-vg/iglm/src/../inst/include/iglm/xz_class.h:163) ==2040226== by 0x24863198: XZ_class::XZ_class(int, bool, std::vector >, std::allocator > > >, std::vector >, std::allocator > > >, arma::Mat, std::__cxx11::basic_string, std::allocator >, double) (packages/tests-vg/iglm/src/../inst/include/iglm/xz_class.h:110) ==2040226== by 0x24837905: XYZ_class (packages/tests-vg/iglm/src/../inst/include/iglm/xyz_class.h:27) ==2040226== by 0x24837905: xyz_count_global_statistic(XYZ_class const&, std::vector, std::allocator > >&, std::vector >&, std::vector const&, double const&, std::__cxx11::basic_string, std::allocator > const&, bool const&), std::allocator const&, double const&, std::__cxx11::basic_string, std::allocator > const&, bool const&)> >, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/xyz_sampling.cpp:118) ==2040226== by 0x24838EFD: xyz_count_global(arma::Mat const&, arma::Col const&, arma::Col const&, arma::Mat const&, arma::Mat const&, bool, std::vector, std::allocator >, std::allocator, std::allocator > > >, int, std::vector, std::allocator > >&, std::vector >&, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/xyz_sampling.cpp:243) ==2040226== by 0x247FB1E4: _iglm_xyz_count_global (R-devel/site-library/Rcpp/include/Rcpp/as.h:43) ==2040226== by 0x4A7E79: R_doDotCall (svn/R-devel/src/main/dotcode.c:813) ==2040226== by 0x4E2103: bcEval_loop (svn/R-devel/src/main/eval.c:8682) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7515) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7500) ==2040226== by 0x4F258A: Rf_eval (svn/R-devel/src/main/eval.c:1167) ==2040226== by 0x4F430D: R_execClosure (svn/R-devel/src/main/eval.c:2389) ==2040226== by 0x4F4FC6: applyClosure_core (svn/R-devel/src/main/eval.c:2302) ==2040226== by 0x4F2695: Rf_applyClosure (svn/R-devel/src/main/eval.c:2324) ==2040226== by 0x4F2695: Rf_eval (svn/R-devel/src/main/eval.c:1280) ==2040226== by 0x4F735C: do_set (svn/R-devel/src/main/eval.c:3581) ==2040226== Address 0x2405babd is 3 bytes before a block of size 9 alloc'd ==2040226== at 0x4843FEC: operator new(unsigned long) (/builddir/build/BUILD/valgrind-3.24.0/coregrind/m_replacemalloc/vg_replace_malloc.c:487) ==2040226== by 0x24860B92: allocate (/usr/include/c++/14/bits/new_allocator.h:151) ==2040226== by 0x24860B92: allocate (/usr/include/c++/14/bits/alloc_traits.h:478) ==2040226== by 0x24860B92: _M_allocate (/usr/include/c++/14/bits/stl_vector.h:380) ==2040226== by 0x24860B92: _M_create_storage (/usr/include/c++/14/bits/stl_vector.h:398) ==2040226== by 0x24860B92: _Vector_base (/usr/include/c++/14/bits/stl_vector.h:334) ==2040226== by 0x24860B92: vector (/usr/include/c++/14/bits/stl_vector.h:571) ==2040226== by 0x24860B92: std::vector >::_M_fill_assign(unsigned long, char const&) (/usr/include/c++/14/bits/vector.tcc:278) ==2040226== by 0x24862C2D: assign (/usr/include/c++/14/bits/stl_vector.h:809) ==2040226== by 0x24862C2D: Network (packages/tests-vg/iglm/src/../inst/include/iglm/network_class.h:35) ==2040226== by 0x24862C2D: XZ_class::XZ_class(int, bool, std::vector >, std::allocator > > >, std::vector >, std::allocator > > >, arma::Mat, std::__cxx11::basic_string, std::allocator >, double) (packages/tests-vg/iglm/src/../inst/include/iglm/xz_class.h:81) ==2040226== by 0x24837905: XYZ_class (packages/tests-vg/iglm/src/../inst/include/iglm/xyz_class.h:27) ==2040226== by 0x24837905: xyz_count_global_statistic(XYZ_class const&, std::vector, std::allocator > >&, std::vector >&, std::vector const&, double const&, std::__cxx11::basic_string, std::allocator > const&, bool const&), std::allocator const&, double const&, std::__cxx11::basic_string, std::allocator > const&, bool const&)> >, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/xyz_sampling.cpp:118) ==2040226== by 0x24838EFD: xyz_count_global(arma::Mat const&, arma::Col const&, arma::Col const&, arma::Mat const&, arma::Mat const&, bool, std::vector, std::allocator >, std::allocator, std::allocator > > >, int, std::vector, std::allocator > >&, std::vector >&, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double) (packages/tests-vg/iglm/src/xyz_sampling.cpp:243) ==2040226== by 0x247FB1E4: _iglm_xyz_count_global (R-devel/site-library/Rcpp/include/Rcpp/as.h:43) ==2040226== by 0x4A7E79: R_doDotCall (svn/R-devel/src/main/dotcode.c:813) ==2040226== by 0x4E2103: bcEval_loop (svn/R-devel/src/main/eval.c:8682) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7515) ==2040226== by 0x4F2257: bcEval (svn/R-devel/src/main/eval.c:7500) ==2040226== by 0x4F258A: Rf_eval (svn/R-devel/src/main/eval.c:1167) ==2040226== by 0x4F430D: R_execClosure (svn/R-devel/src/main/eval.c:2389) ==2040226== by 0x4F4FC6: applyClosure_core (svn/R-devel/src/main/eval.c:2302) ==2040226== iglm object -------------------------------------------------- Formula: xyz_obj_new ~ edges(mode = "local") + attribute_y + attribute_x + degrees Observed Sufficient Statistics: edges(mode = 'local') attribute_y attribute_x 0 0 0 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| iglm object -------------------------------------------------- Formula: xyz_obj_new ~ edges(mode = "local") + attribute_y + attribute_x + degrees Observed Sufficient Statistics: edges(mode = 'local') attribute_y attribute_x 0 0 0 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| 0% 10 20 30 40 50 60 70 80 90 100% [----|----|----|----|----|----|----|----|----|----| **************************************************| [ FAIL 0 | WARN 0 | SKIP 0 | PASS 150 ] > > proc.time() user system elapsed 862.792 20.636 875.325 ==2040226== ==2040226== HEAP SUMMARY: ==2040226== in use at exit: 222,546,332 bytes in 46,813 blocks ==2040226== total heap usage: 21,072,669 allocs, 21,025,856 frees, 3,150,376,238 bytes allocated ==2040226== ==2040226== 448 bytes in 1 blocks are possibly lost in loss record 207 of 2,998 ==2040226== at 0x484B133: calloc (/builddir/build/BUILD/valgrind-3.24.0/coregrind/m_replacemalloc/vg_replace_malloc.c:1675) ==2040226== by 0x4011F63: UnknownInlinedFun (/usr/src/debug/glibc-2.39-38.fc40.x86_64/elf/../include/rtld-malloc.h:44) ==2040226== by 0x4011F63: allocate_dtv (/usr/src/debug/glibc-2.39-38.fc40.x86_64/elf/../elf/dl-tls.c:395) ==2040226== by 0x4012A61: _dl_allocate_tls (/usr/src/debug/glibc-2.39-38.fc40.x86_64/elf/../elf/dl-tls.c:673) ==2040226== by 0x557CC03: allocate_stack (/usr/src/debug/glibc-2.39-38.fc40.x86_64/nptl/allocatestack.c:431) ==2040226== by 0x557CC03: pthread_create@@GLIBC_2.34 (/usr/src/debug/glibc-2.39-38.fc40.x86_64/nptl/pthread_create.c:660) ==2040226== by 0x54B0076: gomp_team_start (/usr/src/debug/gcc-14.2.1-3.fc40.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libgomp/../../../libgomp/team.c:859) ==2040226== by 0x54A60A0: GOMP_parallel (/usr/src/debug/gcc-14.2.1-3.fc40.x86_64/obj-x86_64-redhat-linux/x86_64-redhat-linux/libgomp/../../../libgomp/parallel.c:176) ==2040226== by 0x247ED313: min (/usr/include/c++/14/bits/stl_algobase.h:238) ==2040226== by 0x247ED313: get (R-devel/site-library/RcppArmadillo/include/current/armadillo_bits/mp_misc.hpp:59) ==2040226== by 0x247ED313: void arma::eop_core::apply, arma::Col >(arma::Mat&, arma::eOp, arma::eop_exp> const&) [clone .isra.0] (R-devel/site-library/RcppArmadillo/include/current/armadillo_bits/eop_core_meat.hpp:268) ==2040226== by 0x24845D73: Mat, arma::eop_exp> (R-devel/site-library/RcppArmadillo/include/current/armadillo_bits/Mat_meat.hpp:5448) ==2040226== by 0x24845D73: Col, arma::eop_exp> > (R-devel/site-library/RcppArmadillo/include/current/armadillo_bits/Col_meat.hpp:524) ==2040226== by 0x24845D73: cond_estimation_nondegrees_pl(arma::Col, arma::Col&, arma::Col&, arma::Col&, bool, std::tuple, arma::Col >&, int, double, arma::Col&, double, bool&, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double, bool) (packages/tests-vg/iglm/src/xyz_sampling.cpp:1669) ==2040226== by 0x248514DF: outerloop_estimation_pl(arma::Col, arma::Col, arma::Mat const&, arma::Col const&, arma::Col const&, arma::Mat const&, arma::Mat const&, bool, std::vector, std::allocator >, std::allocator, std::allocator > > >, std::vector, std::allocator > >&, std::vector >&, bool, int, int, int, double, double, bool, bool, bool, bool, std::__cxx11::basic_string, std::allocator >, std::__cxx11::basic_string, std::allocator >, double, double, bool, int) (packages/tests-vg/iglm/src/xyz_sampling.cpp:2858) ==2040226== by 0x247FDD08: _iglm_outerloop_estimation_pl (packages/tests-vg/iglm/src/RcppExports.cpp:181) ==2040226== by 0x4A7B1F: R_doDotCall (svn/R-devel/src/main/dotcode.c:918) ==2040226== by 0x4A8563: do_dotcall (svn/R-devel/src/main/dotcode.c:1437) ==2040226== ==2040226== LEAK SUMMARY: ==2040226== definitely lost: 0 bytes in 0 blocks ==2040226== indirectly lost: 0 bytes in 0 blocks ==2040226== possibly lost: 448 bytes in 1 blocks ==2040226== still reachable: 222,545,736 bytes in 46,811 blocks ==2040226== suppressed: 148 bytes in 1 blocks ==2040226== Reachable blocks (those to which a pointer was found) are not shown. ==2040226== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==2040226== ==2040226== For lists of detected and suppressed errors, rerun with: -s ==2040226== ERROR SUMMARY: 17 errors from 3 contexts (suppressed: 0 from 0)