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

A small, but meaningful start, to addressing undefined behavior #2633

Merged
merged 6 commits into from
Feb 24, 2023

Conversation

WardF
Copy link
Member

@WardF WardF commented Feb 21, 2023

A cast was resulting in undefined behavior, and had to be worked around in a style approximating C++'s 'reinterpret_cast'. This was discovered using the -fsanitize=undefined compiler flag w/ clang, and there is a lot of other work to be done. I am hoping that these fixes, when patched in to libnetcdf-feedstock, will also address the issue observed at conda-forge/libnetcdf-feedstock#138.

…running nc_test/nc_test, in support of Unidata#1983, amongst others.  The cast as was being used was undefined behavior, and had to be worked around in a style approximating C++'s 'reinterpret_cast'
@WardF WardF added this to the 4.9.2 milestone Feb 21, 2023
@WardF WardF self-assigned this Feb 21, 2023
@WardF WardF changed the title A small, but meaningfull start, to addressing undefined behavior A small, but meaningful start, to addressing undefined behavior Feb 21, 2023
WardF added a commit to dopplershift/libnetcdf-feedstock that referenced this pull request Feb 24, 2023
…relate to undefined behavior in nc_test, and (unsigned char) values being assigned to variables of type (char)
@WardF WardF marked this pull request as ready for review February 24, 2023 21:34
@WardF WardF merged commit 17b4cb3 into Unidata:main Feb 24, 2023
@WardF WardF deleted the gh1983.wif branch February 24, 2023 22:14
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.

nc_test fails when optimization greater than -O0 is invoked.
2 participants