-
Notifications
You must be signed in to change notification settings - Fork 455
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
Floating Point Domain Error triggered by IdentifyBuiltinColorSpace() #2066
Comments
stolk
added a commit
to stolk/OpenColorIO
that referenced
this issue
Sep 30, 2024
This change prevents calling powf(x,y) with negative x. The SIMD versions using ssePower() already seem to be resistent to negative pixel values, but the scalar version was not. This would cause a SIGFPE on apps that have floating point exceptions enabled. FIXES: AcademySoftwareFoundation#2066 Signed-off-by: Bram Stolk <[email protected]>
stolk
added a commit
to stolk/OpenColorIO
that referenced
this issue
Sep 30, 2024
This change prevents calling powf(x,y) with negative x. The SIMD versions using ssePower() already seem to be resistent to negative pixel values, but the scalar version was not. This would cause a SIGFPE on apps that have floating point exceptions enabled. FIXES: AcademySoftwareFoundation#2066 Signed-off-by: Bram Stolk <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IdentifyBuiltinColorSpace()
applies transformations on pixel values that can leave the pixel value containing negative values.Subsequently, when a gamma curve is applied in
OpenColorIO_v2_4dev::GammaMoncurveOpCPURev::apply()
thepowf()
function is called with a negative base and a fractional power, which causes a domain error.This leads to a SIGFPE and will abort applications that have floating point exceptions enabled.
From the powf() manual page:
If x is a finite value less than 0, and y is a finite noninteger, a domain error occurs, and a NaN is returned.
OpenColorIO should not be calling
powf()
on negative values.The text was updated successfully, but these errors were encountered: