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

Fixed regression in Imath::succf() and Imath::predf() when negative values are given (for 2.4) #998

Conversation

christianaguilera-foundry
Copy link

@christianaguilera-foundry christianaguilera-foundry commented Apr 12, 2021

The issue was introduced in OpenEXR 2.4.0 as part of c8a7f6a#diff-f09c17d3ab2fe5564e547c8461f1a43a6fe1109ebaf663a8463d1a9643c20ee0, where the type of a member of a union was changed from signed to unsigned, breaking comparison against > 0 a few lines below.

Since OpenEXR 2.4.0, Imath::predf(-2) returns -1.9999998807907104 instead of -2.000000238418579.

Test coverage has been added for this regression.

Fixes #999 (for the 2.4 line).


EDIT:

This PR is going to be abandoned. See #1013 for v2.4 and AcademySoftwareFoundation/Imath#140 for v3. (Another PR will have to be created for v2.5.)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 12, 2021

CLA Not Signed

@christianaguilera-foundry christianaguilera-foundry force-pushed the bugfix/succf_predf_regression_fix_for_2.4 branch 2 times, most recently from 3fb631e to ca7d8da Compare April 12, 2021 09:59
@christianaguilera-foundry christianaguilera-foundry force-pushed the bugfix/succf_predf_regression_fix_for_2.4 branch from ca7d8da to b98d5b5 Compare April 13, 2021 11:45
@cary-ilm
Copy link
Member

Good catch, and thanks for the test, it's a bit surprising there wasn't already a test to catch this.

We do require a signed CLA, although we're in the process of switching the EasyCLA system to a new form, so the automated process will lead to the outdated form. The correct form is here:
https://github.com/AcademySoftwareFoundation/openexr/blob/master/ASWF/legal/OpenEXR%20Corporate%20Contributor%20License%20Agreement.md

We will also want to patch this into v2.5 and 3.0.

@christianaguilera-foundry christianaguilera-foundry force-pushed the bugfix/succf_predf_regression_fix_for_2.4 branch from b98d5b5 to f3a7754 Compare April 13, 2021 17:53
@christianaguilera-foundry
Copy link
Author

We do require a signed CLA, although we're in the process of switching the EasyCLA system to a new form, so the automated process will lead to the outdated form. The correct form is here:
https://github.com/AcademySoftwareFoundation/openexr/blob/master/ASWF/legal/OpenEXR%20Corporate%20Contributor%20License%20Agreement.md

Foundry is looking at the CLA matter. I'll get back to you when I have more details.

We will also want to patch this into v2.5 and 3.0.

I was waiting for this PR to be reviewed to create another PR for 2.5.

In regards to 3.0, that now lives in a different project, a fresh patch would be created. (Since the .clang-format file has changed, the patch would be the same, except for the indentation, that would be slightly different.) Does this sound correct?

@cary-ilm
Copy link
Member

Yes, that sounds correct, for 3.0 this file is in https://github.com/AcademySoftwareFoundation/Imath/blob/master/src/Imath/ImathFun.cpp, and the formatting has indeed changed. Thanks.

Copy link
Member

@cary-ilm cary-ilm left a comment

Choose a reason for hiding this comment

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

LGTM

@cary-ilm
Copy link
Member

@christianaguilera-foundry, any update on the CLA?

@christianaguilera-foundry
Copy link
Author

@christianaguilera-foundry, any update on the CLA?

No news. Let me try to speed it up.

@cary-ilm
Copy link
Member

cary-ilm commented May 6, 2021

Checking in again, any progress on the CLA? If this is an obstacle, I can recreate the fix myself, let me know. Thanks.

@cary-ilm
Copy link
Member

cary-ilm commented May 7, 2021

Fix is replicated in #1013.

@christianaguilera-foundry
Copy link
Author

This PR is going to be abandoned. See #1013 for v2.4 and AcademySoftwareFoundation/Imath#140 for v3. (Another PR will have to be created for v2.5.)

@christianaguilera-foundry christianaguilera-foundry deleted the bugfix/succf_predf_regression_fix_for_2.4 branch May 10, 2021 09:32
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.

4 participants