Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More careful treatment of NA values prior to CCTZ call #136

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

eddelbuettel
Copy link
Owner

As reported by @trevorld and discussed quite extensively in issue 45 of the RcppCCTZ repo, CRAN found an UBSAN warning in his package (that uses our pair of packages.

This PR modifies the behavior in the formatting helper (seen the in callstack in that report) slightly in that it identifies possible NA values and sets them to non-NA before calling CCTZ and then flags the corresponding results as NA. This allows use to continue to use 'non-standard' (in the IEEE sense) NA flags in characters (and ints and ... as R does) without tickling CCTZ. We may want to look into dealing with it in RcppCCTZ in some places too, and there may be others here.

@eddelbuettel eddelbuettel requested a review from lsilvest January 7, 2025 14:13
Copy link
Collaborator

@lsilvest lsilvest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good from my perspective.

@eddelbuettel eddelbuettel merged commit 6e2fc68 into master Jan 7, 2025
4 checks passed
@eddelbuettel eddelbuettel deleted the feature/improved_na_handling branch January 7, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants