[R-pkg-devel] New package with C++ code causes R abort in RStudio, not in R console.
Ivan Krylov
|kry|ov @end|ng |rom d|@root@org
Thu Nov 14 21:32:51 CET 2024
В Thu, 14 Nov 2024 13:08:13 +0000
Luc De Wilde <Luc.DeWilde using UGent.be> пишет:
> At last, with checking of the program with address sanitizer in
> Visual Studio, I found an "off by 1 error" in my code. Now all tests
> pass without problems in Rstudio.
Congratulations on being able to solve the problem yourself!
It took me too long to figure out that the syntax errors I was getting
from lavaanC::lav_parse_model_string_c() were due to the invisible
U+00A0 (non-breakable space) characters from the e-mail. Once I ran
lav_parse_model_string_c(gsub('\ua0', ' ', model)) in a sanitized build
of R, I too saw the buffer overflow and a number of memory leaks.
Would you mind sharing with the list how you used address sanitizer
with R on Windows? Did you have to use the clang compiler, or have you
been able to use MSVC? Does Dr. Memory <https://drmemory.org/> find any
additional problems?
--
Best regards,
Ivan
More information about the R-package-devel
mailing list