mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:09:23 +02:00
* check if current_procinfo is assigned in paramanager code to avoid crashes
git-svn-id: trunk@23303 -
This commit is contained in:
parent
329257d76e
commit
7ac9f11cc7
@ -530,6 +530,10 @@ unit cpupara;
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
paraloc^.reference.index:=NR_R12;
|
paraloc^.reference.index:=NR_R12;
|
||||||
|
|
||||||
|
{ create_paraloc_info_intern might be also called when being outside of
|
||||||
|
code generation so current_procinfo might be not set }
|
||||||
|
if assigned(current_procinfo) then
|
||||||
tppcprocinfo(current_procinfo).needs_frame_pointer := true;
|
tppcprocinfo(current_procinfo).needs_frame_pointer := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -427,6 +427,9 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
{ during procedure entry, NR_OLD_STACK_POINTER_REG contains the old stack pointer }
|
{ during procedure entry, NR_OLD_STACK_POINTER_REG contains the old stack pointer }
|
||||||
paraloc^.reference.index := NR_OLD_STACK_POINTER_REG;
|
paraloc^.reference.index := NR_OLD_STACK_POINTER_REG;
|
||||||
|
{ create_paraloc_info_intern might be also called when being outside of
|
||||||
|
code generation so current_procinfo might be not set }
|
||||||
|
if assigned(current_procinfo) then
|
||||||
tppcprocinfo(current_procinfo).needs_frame_pointer := true;
|
tppcprocinfo(current_procinfo).needs_frame_pointer := true;
|
||||||
end;
|
end;
|
||||||
paraloc^.reference.offset := stack_offset;
|
paraloc^.reference.offset := stack_offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user