[fpc-devel]Okay, another one
Yakov Sudeikin
yashka at exebook.com
Sat Apr 12 11:21:04 CEST 2003
Let me explain my lame attempt to find and fix a bug in fpc11.
pp myproject -vu
Fatal: Internal error 200212142:618
(Unit to crash the compiler: mysqldb.pas)
cd fpc/cvs
grep 200212142 -R *
compiler/ncal.pas matches
function tcallnode.det_resulttype:tnode;
<SKIP>
{ add needed default parameters }
if assigned(procdefinition) and
(paralength<procdefinition.maxparacount) then
begin
currpara:=tparaitem(procdefinition.Para.first);
for i:=1 to paralength do
currpara:=tparaitem(currpara.next);
while assigned(currpara) do
begin
if not assigned(currpara.defaultvalue) then
line 1816 --->> internalerror(200212142);
left:=ccallparanode.create(genconstsymtree(tconstsym(currpara.defaultvalue))
,left);
currpara:=tparaitem(currpara.next);
end;
end;
end;
=============================================
Okay now to my unit, I have strted removing lines until got a very
minimalistic view that crashes the compiler.
{$mode delphi}
function xx(a: array of string; b: byte = 1): string;
begin
end;
begin
xx(['']);
end.
Okay what we do now? 2372 lines of code in ncal.pas... How long it will take
for me to understand it :) Without ability to debug in it delphi I will have
to use gdb and this will take even longer. Can anyone explain how to fix
this, I mean not just fix but explain how just as an example. Btw I believe
I reported this bug before.
Thanks,
Yakov
More information about the fpc-devel
mailing list