NEWS entry for fix for CRAN 0-length issues#7007
Merged
MichaelChirico merged 4 commits intopatch-1.17.4from May 26, 2025
Merged
NEWS entry for fix for CRAN 0-length issues#7007MichaelChirico merged 4 commits intopatch-1.17.4from
MichaelChirico merged 4 commits intopatch-1.17.4from
Conversation
* Avoid memcpy()-ing 0-length vectors The C standard (before C23) says that giving invalid pointers, even with length=0, to memcpy() is undefined behaviour. R returns an invalid pointer for vectors of length 0, so avoid calls to memcpy() altogether in such cases. * Use early returns for 0-length cases Co-authored-by: Michael Chirico <chiricom@google.com>
* Avoid memcpy() of empty vector * in getidcols() too * Add a test case Distilled from the `melt()` call here: https://github.com/gdemin/expss/blob/d498caf72a9938ac71b9e06fd61485cd0347d607/tests/testthat/test_subtotal.R#L161-L166
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## patch-1.17.4 #7007 +/- ##
===============================================
Coverage ? 98.56%
===============================================
Files ? 79
Lines ? 14705
Branches ? 0
===============================================
Hits ? 14494
Misses ? 211
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Looks like this was mostly edited in already in previous commits, except for the NEWS entry. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick 299d44d and d28cce9 into the patch branch (already present on
master) in order to solve the problems noted in #7006. I've tried to follow the previous patch branches, but feel free to edit anything that should be improved.