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

testFutureProofing and testMultiPartFileMixingBasic fail on big endian arches #81

Closed
sharkcz opened this issue Nov 20, 2013 · 4 comments
Labels
Bug A bug in the source code

Comments

@sharkcz
Copy link
Contributor

sharkcz commented Nov 20, 2013

testFutureProofing and testMultiPartFileMixingBasic both use fread(&length,4,f) to get a 4 byte integer value from input file. The value read is not converted from the little endian format to the machine format causing problems (eg. test didn't finish after 24 hours).

something like

+#include "byteswap.h"
+#include "ImfSystemSpecific.h"

...
             fread(&length,4,1,f);
+            if (!GLOBAL_SYSTEM_LITTLE_ENDIAN)
+            {
+                int tmp = bswap_32(length);
+               length = tmp;
+            }

...

should be used

@sharkcz
Copy link
Contributor Author

sharkcz commented Nov 20, 2013

@malaterre
Copy link

Link was broken for me. It should read: http://pkgs.fedoraproject.org/cgit/OpenEXR.git/tree/openexr-2.1.0-bigendian.patch

@kloczek
Copy link

kloczek commented Apr 13, 2019

Please submit this patch as PR.

sharkcz added a commit to sharkcz/openexr that referenced this issue Apr 15, 2019
testFutureProofing and testMultiPartFileMixingBasic both use fread(&length,4,f) to get a 4 byte
integer value from input file. The value read is not converted from the little endian format to
the machine format causing problems (eg. test didn't finish after 24 hours).

fixes issue AcademySoftwareFoundation#81
@cary-ilm cary-ilm added this to the Next Release milestone Jun 28, 2019
cary-ilm pushed a commit to cary-ilm/openexr that referenced this issue Jul 2, 2019
testFutureProofing and testMultiPartFileMixingBasic both use fread(&length,4,f) to get a 4 byte
integer value from input file. The value read is not converted from the little endian format to
the machine format causing problems (eg. test didn't finish after 24 hours).

fixes issue AcademySoftwareFoundation#81
cary-ilm added a commit to cary-ilm/openexr that referenced this issue Jul 2, 2019
cary-ilm pushed a commit that referenced this issue Jul 12, 2019
testFutureProofing and testMultiPartFileMixingBasic both use fread(&length,4,f) to get a 4 byte
integer value from input file. The value read is not converted from the little endian format to
the machine format causing problems (eg. test didn't finish after 24 hours).

fixes issue #81
cary-ilm added a commit that referenced this issue Jul 12, 2019
Signed-off-by: Cary Phillips <cary@ilm.com>
@cary-ilm
Copy link
Member

This seems to have been resolved. Closing the issue for now, feel free to re-open or file a new issue if you need further help.

DominicJacksonBFX pushed a commit to boris-fx/mocha-openexr that referenced this issue Jun 22, 2022
testFutureProofing and testMultiPartFileMixingBasic both use fread(&length,4,f) to get a 4 byte
integer value from input file. The value read is not converted from the little endian format to
the machine format causing problems (eg. test didn't finish after 24 hours).

fixes issue AcademySoftwareFoundation#81
DominicJacksonBFX pushed a commit to boris-fx/mocha-openexr that referenced this issue Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in the source code
Projects
None yet
Development

No branches or pull requests

5 participants