В Thu, 4 Sep 2025 07:07:32 +0000
Pepijn de Vries <pepijn.devr...@outlook.com> пишет:

> When I check the submitted package with rhub's the gcc-ASAN docker
> file, the issues reported by CRAN don't pop up.

Is it this one?
https://github.com/r-hub/containers/blob/main/containers/gcc-asan/Dockerfile

Looks like it's based on Fedora 40 with GCC 14, while Prof. Brian
Ripley runs the gcc-ASAN checks on Fedora 42 with GCC 15:
https://www.stats.ox.ac.uk/pub/bdr/memtests/README.txt

(If README.txt and 00check.log ever disagree, trust 00check.log.)

Sometimes the issues are trivial to reproduce with any version of gcc
-fsanitize. Sometimes you need the right compiler version. Sometimes
you need to compile R and all dependencies from source so that they are
all instrumented by sanitizers. Sometimes even a fully reproducible
build environment, if it existed, wouldn't be enough because the issue
is only visible when the CPU is fully loaded with some threads being
starved for CPU time [*].

I think that currently, the approach most likely to reproduce the
problem is to start with a Fedora 42 container and follow the
README.txt together with WRE 4.3.3 and 4.3.4 to build R and all
dependencies from source. There are many shortcuts that could be taken
(and the ones taken by r-hub containers save a lot of electricity and
time running CI!), but they carry a risk of missing the problem.

> I'm also not sure how to reproduce the M1mac results.

If you skip install.libs('blosc') in CI on macOS, the failure should be
reproducible, but then there's no way for the configure script to
succeed. Were you asked to fix the error messages produced by the
configure script?

> In short: how can I assure that my fixes are adequate, other then
> resubmitting to CRAN and hoping for the best?

If you'd like to provably prevent the dereference of the [-1] subscript
from happening, consider moving the if (target_unit < 0) stop(...)
inside the previous if (target_unit < 0) branch, before accessing the
arrays. This way even a strange new unit (or a damaged file) won't cause
undefined behaviour.

-- 
Best regards,
Ivan

[*] e.g. https://github.com/Rdatatable/data.table/issues/7051

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to