Open jdumas opened 1 year ago
These UBSan reported line of codes points to codes ported from OpenEXR(not written by me) and somewhat difficult to understand such codes. The reason would be integer overflows. But I'm not sure simple overflow fix is sufficient. It may introduce some side-effects.
Proper solution would be replace OpenEXR-derived codes with our own https://github.com/syoyo/tinyexr/issues/186
For a while, we can simply ignore/suppress UBSan warning: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#disabling-instrumentation-with-attribute-no-sanitize-undefined
Ah the wuffs thing sounds nice. Guess I'll just ignore these issues for now, thanks!
Describe the issue Loading a certain .exr image with UBSan enabled flags some issues in tinyexr.
To Reproduce Steps to reproduce the behavior:
-fsanitize=undefined
)LoadEXRImageFromFile
Image: plastic_stripes_Height.exr.zip
Expected behavior I am not sure whether it's an issue with our .exr image, or a problem in tinyexr, but I'd expect tinyexr to not trigger any runtime UBSan error (this one seems like a shift integer overflow?).
Environment