Closed HenrikBengtsson closed 1 month ago
I think this results from an edge case which occurs when calling rowSums2()
with a zero-lenght row subset. In this case, R_alloc()
returns a NULL
pointer for the row subset. The code than calls memset()
on this pointer. Because the lenght of the memory to write to is zero, this should behave like a no-op, but still appearently considered undefined behavior.
CRAN notification
From: Prof Brian Ripley Date: Wed, Sep 4, 2024 at 10:35 PM Subject: CRAN package matrixStats To: henrikb@braju.com Cc: CRAN@r-project.org
Dear maintainer,
Please see the problems shown on https://cran.r-project.org/web/checks/check_results_matrixStats.html.
Please correct before 2024-09-19 to safely retain your package on CRAN.
Do remember to look at the 'Additional issues'.
The CRAN Team
Details
From https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-UBSAN/matrixStats/ and then https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-UBSAN/matrixStats/tests/rowSums2_subset.Rout: