Steam for Linux

Steam for Linux

[Bug] _FILE_OFFSET_BITS=64 needed for large file-systems in 32-bit applications
Right now disk space detection is not working correctly for anyone with > 2 TiB of free space. Since it is 32-bit it needs to be compiled with _FILE_OFFSET_BITS=64 or some other method to insure larger file-size's/filesystems still work.

When ran on a file-system with a lot of free space disk-space can't be calculated and thus things don't work properly. See screenshot:

http://box.houkouonchi.jp/steam_bug.png

Erroring when the file-system ha >7TB free of disk space.

Here is an example code:

using code btags appears to be broken on this forum so example code here:

http://box.houkouonchi.jp/diskstat.c

On 64-bit this works just fine:

dekabutsu ~ # gcc -o diskstat diskstat.c 2> /dev/null dekabutsu ~ # file diskstat diskstat: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), for GNU/Linux 2.6.16, dynamically linked (uses shared libs), not stripped dekabutsu ~ # ./diskstat /data Disk /data: block size: 4096 total no blocks: 2081576350 free blocks: 1656929874 dekabutsu ~ #

However on 32-bit it does not:

dekabutsu ~ # gcc -o diskstat diskstat.c 2> /dev/null dekabutsu ~ # file diskstat diskstat: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped dekabutsu ~ # ./diskstat /data Failed to stat /data: dekabutsu ~ #

Compiling with _FILE_OFFSET_BITS=64 fixes the problem:

dekabutsu ~ # gcc -D _FILE_OFFSET_BITS=64 -o diskstat diskstat.c 2> /dev/null dekabutsu ~ # file diskstat diskstat: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped dekabutsu ~ # ./diskstat /data Disk /data: block size: 4096 total no blocks: 2081576350 free blocks: 1656929870 dekabutsu ~ #

I am sure lots of other ways you can fix it if you want to explicitly set it in the code as well. But please fix this as its a pretty serious bug.

The other option is of course release a 64-bit compiled binary.
Editat ultima dată de houkouonchi - 方向音痴; 14 nov. 2012 la 0:55
< >
Se afișează 1-4 din 4 comentarii
mikeym 14 nov. 2012 la 1:50 
That's some filesystem you have there houkouonchi.
ThOR27 14 nov. 2012 la 2:31 
Damn. And I tough my 1TB disk was huge.
+1 for research and disk size.
Bumping a useful bug report.
< >
Se afișează 1-4 din 4 comentarii
Per pagină: 1530 50

Data postării: 14 nov. 2012 la 0:50
Postări: 4