[R-pkg-devel] Additional issues: Intel segfault
Ivan Krylov
|kry|ov @end|ng |rom d|@root@org
Fri Mar 1 09:46:28 CET 2024
В Fri, 1 Mar 2024 07:42:01 +0000
Murray Efford <murray.efford using otago.ac.nz> пишет:
> R CMD check suggests it is most likely in the Examples for
> 'validate', but all code there is wrapped in \dontrun{}.
The crash happens after q('no'), suggesting a corruption in the heap or
in the R memory manager. At least it's a null pointer being
dereferenced and not a 0xRANDOM_LOOKING_NUMBER: this limits the impact
of the problem.
I don't know if anyone created an easily reproducible container with an
Intel build of R (there's https://hub.docker.com/r/intel/oneapi, but
aren't the compilers themselves supposed to be not redistributable?),
so you will most likely have to follow
https://www.stats.ox.ac.uk/pub/bdr/Intel/README.txt and
https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Intel-compilers
manually, compiling R using Intel compilers yourself in order to
reproduce this.
I think it would be great if CRAN checking machines used a just-in-time
debugger to provide C-level backtraces at the place of the crash. For
Windows, such a utility does exist [*], but I recently learned that the
glibc `catchsegv` program (and most other similar programs) used to
perform shared object preloading (before being thrown out of the
codebase altogether), which is more intrusive than it could be. A proof
of concept using GDB on Linux can be shown to work:
R -d gdb \
--debugger-args='-batch -ex run -ex bt -ex c -ex q' \
-e '
Rcpp::sourceCpp(code =
"//[[Rcpp::export]]\nvoid rip() { *(double*)(42) = 42; }"
); rip()
'
--
Best regards,
Ivan
[*] https://github.com/jrfonseca/drmingw
More information about the R-package-devel
mailing list