mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:46:00 +02:00
* fixed invalid memory reads and potential double freeing when removing
superfluous temporary paralocs for llvm git-svn-id: trunk@34955 -
This commit is contained in:
parent
ed6d993008
commit
280a6e15b7
@ -151,11 +151,11 @@ unit llvmpara;
|
|||||||
paraloc^.register:=hlcg.getaddressregister(list,paraloc^.def);
|
paraloc^.register:=hlcg.getaddressregister(list,paraloc^.def);
|
||||||
paraloc^.shiftval:=0;
|
paraloc^.shiftval:=0;
|
||||||
{ remove all other paralocs }
|
{ remove all other paralocs }
|
||||||
nextloc:=paraloc^.next;
|
while assigned(paraloc^.next) do
|
||||||
while assigned(nextloc) do
|
|
||||||
begin
|
begin
|
||||||
dispose(nextloc);
|
|
||||||
nextloc:=paraloc^.next;
|
nextloc:=paraloc^.next;
|
||||||
|
paraloc^.next:=nextloc^.next;
|
||||||
|
dispose(nextloc);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
paraloc^.llvmloc.loc:=paraloc^.loc;
|
paraloc^.llvmloc.loc:=paraloc^.loc;
|
||||||
|
Loading…
Reference in New Issue
Block a user