Re: [R-pkg-devel] Valgrind warning on saveRDS, about object in external pointer

2020-07-15 Thread David Cortes
Thanks a lot for the answer! I unfortunately wasn’t able to reproduce it with the same OS + compiler + valgrind settings, but from what I see in the message, turns out in the end it might indeed be due to Cereal copying raw bytes into an R vector and Valgrind complaining about the copied bytes rat

Re: [R-pkg-devel] Valgrind warning on saveRDS, about object in external pointer

2020-07-15 Thread Ivan Krylov
On Wed, 08 Jul 2020 22:43:13 +0300 David Cortes wrote: > About the source code: it actually complains about line > fit_model.cpp:751 : > hplane_root->reserve(exp_nodes); My fault. I was reading the GitHub source code instead of CRAN package source code. > I’m not able to reproduce the warning w

Re: [R-pkg-devel] Valgrind warning on saveRDS, about object in external pointer

2020-07-08 Thread David Cortes
Thanks for answering. I’m not able to reproduce the warning when trying R CMD check with valgrind on my computer (tried compiling with gcc9 and clang9), nor with the r-debug docker images from github ( https://github.com/wch/r-debug). However, from what I was told when trying to upload a new versi

Re: [R-pkg-devel] Valgrind warning on saveRDS, about object in external pointer

2020-07-08 Thread Ivan Krylov
On Wed, 08 Jul 2020 19:23:41 +0300 David Cortes wrote: >- The warning is about an un-initialized value allocated in a call to >C++ std::vector::reserve, which is called on a C++ vector member of the >struct in the external pointer. I'm ready to admit that I didn't read the code well enough, but

[R-pkg-devel] Valgrind warning on saveRDS, about object in external pointer

2020-07-08 Thread David Cortes
Hello, I am currently getting a valgrind warning in a package that I’ve developed, which occurs on a call to R’s ‘saveRDS’, and I am having a very hard time trying to figure out what went wrong: https://www.stats.ox.ac.uk/pub/bdr/memtests/valgrind/isotree/isotree-Ex.Rout In more detail: - The pac