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

Avoid clang warning in -fsanitize=undefined -O mode (master only) #11646

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

rouault
Copy link
Member

@rouault rouault commented Jan 13, 2025

Fixes #11645

@rouault rouault added the funded through GSP Work funded through the GDAL Sponsorship Program label Jan 13, 2025
@schwehr
Copy link
Member

schwehr commented Jan 13, 2025

I copied it over and it works for me. Thanks!

Copy link
Member

@schwehr schwehr left a comment

Choose a reason for hiding this comment

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

LGTM

@rouault
Copy link
Member Author

rouault commented Jan 13, 2025

I had to revert the commit that enabled the -O level in the -fsanitize=undefined CI configuration since it caused runtime issues like:

/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:490:51: runtime error: unsigned integer overflow: 19 - 24 cannot be represented in type 'size_type' (aka 'unsigned long')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:490:51 

@schwehr
Copy link
Member

schwehr commented Jan 13, 2025

Should be fine without the -O. Thanks!

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 70.089% (-0.004%) from 70.093%
when pulling 1107465 on rouault:fix_11645
into 493ed18 on OSGeo:master.

@rouault rouault merged commit 2ad0a28 into OSGeo:master Jan 13, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
funded through GSP Work funded through the GDAL Sponsorship Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang loop optimizer pragma warns on rasterio.cpp.
3 participants