-
Notifications
You must be signed in to change notification settings - Fork 262
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
Fixed various UBSan warnings about working with NULL pointers #2802
Conversation
@DennisHeimbigner @WardF this is the last of #2692 split out. I reformulated it to not use the ternary operator, as per your style. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what do to about this. utf8proc was taken from another site;
Unidata did not create the code. Perhaps we need to see if there is a later
version of utf8prop or find a better replacement.
Looks like utf8proc is currently maintained by the Julia project. Not sure what it would take to update our internal copy, which looks like it's been manually namespaced with an |
Any pointer arithmetic with NULL pointers is technically UB, even if you don't end up dereferencing the pointer.
I'll split the utf8proc change out of this PR in order to not delay this PR. Maybe the issue is already fixed upstream. But we could still use my change in the short term, I think it's a quite conservative change. |
I don't feel like replacing utf8proc, so fixing it seems like the right way to go. |
New PR just for utf8: #2803 |
@DennisHeimbigner - It looks like utf8proc was pulled into netCDF-C back in February 2017 which would have been Unicode 9. Unicode is currently at version 15.1. Most of the new major versions added thousands of new characters. So, seems like it might be worth looking at a full update to the latest utf8proc at some point. |
Any pointer arithmetic with NULL pointers is technically UB, even if you don't end up dereferencing the pointer.