mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 11:29:24 +02:00
* avoid stack overflow in tref.done (bug 846)
This commit is contained in:
parent
8751d6bd6f
commit
12d4917565
@ -2736,7 +2736,10 @@ Const local_symtable_index : longint = $8001;
|
||||
destructor tprocdef.done;
|
||||
begin
|
||||
if assigned(defref) then
|
||||
dispose(defref,done);
|
||||
begin
|
||||
defref^.freechain;
|
||||
dispose(defref,done);
|
||||
end;
|
||||
if assigned(parast) then
|
||||
dispose(parast,done);
|
||||
if assigned(localst) and (localst^.symtabletype<>staticsymtable) then
|
||||
@ -3921,7 +3924,10 @@ Const local_symtable_index : longint = $8001;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.194 2000-02-09 13:23:04 peter
|
||||
Revision 1.195 2000-02-11 13:53:49 pierre
|
||||
* avoid stack overflow in tref.done (bug 846)
|
||||
|
||||
Revision 1.194 2000/02/09 13:23:04 peter
|
||||
* log truncated
|
||||
|
||||
Revision 1.193 2000/02/05 14:33:32 florian
|
||||
@ -3993,4 +3999,4 @@ Const local_symtable_index : longint = $8001;
|
||||
Revision 1.174 1999/11/06 14:34:26 peter
|
||||
* truncated log to 20 revs
|
||||
|
||||
}
|
||||
}
|
@ -147,7 +147,10 @@
|
||||
destructor tsym.done;
|
||||
begin
|
||||
if assigned(defref) then
|
||||
dispose(defref,done);
|
||||
begin
|
||||
defref^.freechain;
|
||||
dispose(defref,done);
|
||||
end;
|
||||
inherited done;
|
||||
end;
|
||||
|
||||
@ -2122,7 +2125,10 @@
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.138 2000-02-09 13:23:05 peter
|
||||
Revision 1.139 2000-02-11 13:53:49 pierre
|
||||
* avoid stack overflow in tref.done (bug 846)
|
||||
|
||||
Revision 1.138 2000/02/09 13:23:05 peter
|
||||
* log truncated
|
||||
|
||||
Revision 1.137 2000/02/04 08:47:10 florian
|
||||
@ -2205,4 +2211,4 @@
|
||||
* -CX is create smartlink
|
||||
* -CD is create dynamic, but does nothing atm.
|
||||
|
||||
}
|
||||
}
|
@ -79,6 +79,7 @@ unit symtable;
|
||||
moduleindex : word;
|
||||
is_written : boolean;
|
||||
constructor init(ref:pref;pos:pfileposinfo);
|
||||
procedure freechain;
|
||||
destructor done; virtual;
|
||||
end;
|
||||
|
||||
@ -803,6 +804,19 @@ implementation
|
||||
is_written:=false;
|
||||
end;
|
||||
|
||||
procedure tref.freechain;
|
||||
var
|
||||
p,q : pref;
|
||||
begin
|
||||
p:=nextref;
|
||||
nextref:=nil;
|
||||
while assigned(p) do
|
||||
begin
|
||||
q:=p^.nextref;
|
||||
dispose(p,done);
|
||||
p:=q;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor tref.done;
|
||||
var
|
||||
@ -811,8 +825,6 @@ implementation
|
||||
inputfile:=get_source_file(moduleindex,posinfo.fileindex);
|
||||
if inputfile<>nil then
|
||||
dec(inputfile^.ref_count);
|
||||
if assigned(nextref) then
|
||||
dispose(nextref,done);
|
||||
nextref:=nil;
|
||||
end;
|
||||
|
||||
@ -2769,7 +2781,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.76 2000-02-09 13:23:05 peter
|
||||
Revision 1.77 2000-02-11 13:53:49 pierre
|
||||
* avoid stack overflow in tref.done (bug 846)
|
||||
|
||||
Revision 1.76 2000/02/09 13:23:05 peter
|
||||
* log truncated
|
||||
|
||||
Revision 1.75 2000/01/12 10:38:18 peter
|
||||
@ -2845,4 +2860,4 @@ end.
|
||||
Revision 1.56 1999/11/04 23:13:25 peter
|
||||
* moved unit alias support into ifdef
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user