[fpc-devel]bug

Rimgaudas Laucius rimga at ktl.mii.lt
Mon Oct 7 12:02:03 CEST 2002


Hi,

earlier i wrote about very strange error. I trayed to debug it and found that esi register is not initialized before it is used. It is visible in the attached picture.
Much more i insert missing asm line into program source and now it works fine:
procedure TGDB.LoadFile(p: PChar); stdcall;
var
  s: string;
begin
  {$ASMMODE intel}
  asm  
     mov  esi, DWORD PTR [ebp+8];  // <---------missing code
  end; 
  if fRunn then
     Reset;
  WriteLn(fRunn);  //<------now program does not crashes
  s:= p;
  LoadFile(s);
  StartTrace;
  fRunn:= true;
end;

I think this bug origin is interface used in the class. Because i noticed similar problem with interfaces and wrote about it ealier.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20021007/68c02696/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.gif
Type: image/gif
Size: 18848 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20021007/68c02696/attachment.gif>


More information about the fpc-devel mailing list