AW: [fpc-devel] 2.0.3 AV's/ BUG 4999 / BUG 5000

Helmut Hartl helmut.hartl at firmos.at
Mon Apr 10 08:12:17 CEST 2006


Hello,

> It has nothing to do with the memory manager? It's a bug in the fastmove
> routines probably.

Many thank's for fixing the BUG 4999!
I postet the follow up as 5000 now.

As with 4999 in 2.0.2 it works, 2.0.3 crashes.

helmut

---- Source

program fpc203fish_2;
{$mode objfpc}{$H+}
uses  Classes,zstream;
var cz:TCompressionStream;
     m:TMemoryStream;
     s:String;
    pc:PChar;
     i:integer;
begin
 m:=TMemoryStream.Create;
 cz:=TCompressionStream.Create(TCompressionlevel(2),m);
 s:='123123sdfjkysdjfklsdn3m';
 for i:=0 to 10 do begin
  s:=s+s;
 end;
 pc:=pchar(s);
 i:=length(s);
 cz.Write(pc^,i);
 cz.Write(i,sizeof(i));
 cz.Write(pc^,i);
 cz.Write(i,sizeof(i));
 m.SaveToFile('test');
end.      

---- Output

EAccessViolation : Access violation
$0807141E INSERT_STRING, line 489 of zdeflate.pas




More information about the fpc-devel mailing list