fpc rtl cannot deal with files over 2GB!
Original Reporter info from Mantis: dmarinescu
-
Reporter name: dan marinescu
Original Reporter info from Mantis: dmarinescu
- Reporter name: dan marinescu
Description:
program bigfile;
var
f: TextFile;
begin
Assign(f, 'rez.rez');
Rewrite(f);
while True do
WriteLn(f, 'Hello World');
Close(f);
end.
The program will crash when the file rez.rez reaches 2GB. It is NOT a filesystem limitation (tried JFS, ReiserFS, XFS on 64 bit machines). Proof: the following program will cross that barier:
program bigfile2;
begin
while True do
WriteLn('Hello World');
end.
When you go like ./bigfile2 > rez.rez
Steps to reproduce:
compile bigfile & bigfile2
run ./bigfile
expected: should run over the 2GB filesize limit
actual: crashes when rez.rez reaches 2GB filesize limit
run ./bigfile2 > rez.rez
now everything is file, rez.rez grows to terabytes!
ps
this is a show stopper... issue is not in lazarus ide, it's the fpc rtl
Additional information:
if you don't have time, i can fix that, how do i get check-in rights?
Mantis conversion info:
- Mantis ID: 1126
- OS: Any Linux Unix
- OS Build: N/A
- Build: not important
- Platform: Intel AMD (both 32 and 64 bit)
- Version: 0.9.8