-
Notifications
You must be signed in to change notification settings - Fork 576
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
invalid-shift-base UndefinedBehaviorSanitizer error #2072
Comments
Just following up on this. @mikedh or others: Do you have any suggestions or advice? Thank you! |
Seems like we can offset to the minimum there, which I just PR'd. Looking at that function there's probably a faster way to do the grouping but this is ok for now. How were you running the tests? It doesn't look like there's an easy way to run that behavior checker via pytest. |
Thank you, so much for looking at this @mikedh! Much appreciated. Yes, it is a bit complicated to test in isolation -- we have this integrated in a larger codebase and running sanitizer checks on that. However, I tried your fix and
So perhaps we are going over the 32-bit representation while applying the offset? Thanks. |
trimesh/trimesh/grouping.py
Line 204 in 46b6aaf
We use trimesh and with Python 3.10. And, during testing, UndefinedBehaviorSanitizer (UBSAN) threw an error with this operation when the contents of the
column
are negative values. I see that this is an optimization put in place in case "array is 2D and smallish", but is there a way to accomplish this efficiently while not triggering UndefinedBehaviorSanitizer error? I would greatly appreciate and thoughts and suggestions. Thank you.The text was updated successfully, but these errors were encountered: