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

Bug: DefaultIOStream::FileSize() broken on 32bit systems #4390

Closed
flixr opened this issue Feb 16, 2022 · 3 comments · Fixed by #4398
Closed

Bug: DefaultIOStream::FileSize() broken on 32bit systems #4390

flixr opened this issue Feb 16, 2022 · 3 comments · Fixed by #4398
Labels
Bug Global flag to mark a deviation from expected behaviour Build Global flag to mark build relates topics

Comments

@flixr
Copy link

flixr commented Feb 16, 2022

Describe the bug
stat can fail on 32bit systems if not compiled with -D_FILE_OFFSET_BITS=64.
That could be because inode number is too large (happens on many file systems) or the file itself is too large.

This was

I don't know why it was apparently removed because of Android builds (cmake check for android not working)?
But for 32bit armhf this is needed for sure.

To Reproduce
Try reading a file with assimp on armhf (or probably any other 32bit arch) which has a inode number not representable in 32bit.
E.g. from a NFS mount or XFS file system.

Expected behavior
DefaultIOStream::FileSize() returns correct size instead of 0.

Platform (please complete the following information):

  • OS: Linux/armhf

Additional context
Might be the (or at least one) cause for autopkgtests failing for 32bit archs:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995859

@flixr flixr added the Bug Global flag to mark a deviation from expected behaviour label Feb 16, 2022
kimkulling added a commit that referenced this issue Feb 20, 2022
- Reenable fix to ensure that stat works correctly on 32-bit linuxes again
  - stat will return 32-bit inodes when checking a file. So when this call will be used on a 64-bit linux this will cause errors like:
Error writing to foo: Value too large for defined data type
File I/O error: foo
- closes #4390
@kimkulling
Copy link
Member

FuXXX, sorry for that. This bug was introduced by myself. The fix is on its way.

@kimkulling kimkulling added the Build Global flag to mark build relates topics label Feb 20, 2022
@kimkulling
Copy link
Member

Shall be fixed now.

@flixr
Copy link
Author

flixr commented Feb 21, 2022

actually adding the definition is still commented out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour Build Global flag to mark build relates topics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants