mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
* never inline routines that call get_frame (otherwise get_frame would return
the frame of the caller rather than of the current routine, which could cause e.g. stackframes to be missed in RTL helpers that are known to be only called from run time error routines) git-svn-id: trunk@44064 -
This commit is contained in:
parent
08f9ec98e5
commit
b625afe800
@ -746,7 +746,9 @@ interface
|
||||
{ set if the procedure has generated data which shall go in an except table }
|
||||
pi_has_except_table_data,
|
||||
{ subroutine needs to load and maintain a tls register }
|
||||
pi_needs_tls
|
||||
pi_needs_tls,
|
||||
{ subroutine uses get_frame }
|
||||
pi_uses_get_frame
|
||||
);
|
||||
tprocinfoflags=set of tprocinfoflag;
|
||||
|
||||
|
@ -4471,6 +4471,7 @@ implementation
|
||||
function tinlinenode.first_get_frame: tnode;
|
||||
begin
|
||||
include(current_procinfo.flags,pi_needs_stackframe);
|
||||
include(current_procinfo.flags,pi_uses_get_frame);
|
||||
expectloc:=LOC_CREGISTER;
|
||||
result:=nil;
|
||||
end;
|
||||
|
@ -208,6 +208,12 @@ implementation
|
||||
exit;
|
||||
end;
|
||||
|
||||
if pi_uses_get_frame in current_procinfo.flags then
|
||||
begin
|
||||
_no_inline('get_frame');
|
||||
exit;
|
||||
end;
|
||||
|
||||
for i:=0 to procdef.paras.count-1 do
|
||||
begin
|
||||
currpara:=tparavarsym(procdef.paras[i]);
|
||||
|
@ -1628,7 +1628,9 @@ const
|
||||
(mask:pi_has_except_table_data;
|
||||
str:' has except table data '),
|
||||
(mask:pi_needs_tls;
|
||||
str:' uses TLS data pointer ')
|
||||
str:' uses TLS data pointer '),
|
||||
(mask:pi_uses_get_frame;
|
||||
str:' uses get_frame')
|
||||
);
|
||||
var
|
||||
procinfooptions : tprocinfoflags;
|
||||
|
Loading…
Reference in New Issue
Block a user