mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 12:39:31 +02:00
* Do not remove a ret-in-param value from the stack by callee for safecall function when safecall exception check is enabled for a target.
The bug has been triggered only with the following conditions: - tf_safecall_exceptions, tf_safecall_clearstack in target flags; - fixed stack is used. Since only the i386-android target meets these conditions atm, the bug has been unnoticed. git-svn-id: trunk@32005 -
This commit is contained in:
parent
e8a4b6c820
commit
d8542bf778
@ -1408,7 +1408,11 @@ implementation
|
||||
if current_procinfo.procdef.proccalloption in clearstack_pocalls then
|
||||
begin
|
||||
parasize:=0;
|
||||
if paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef) then
|
||||
{ For safecall functions with safecall-exceptions enabled the funcret is always returned as a para
|
||||
which is considered a normal para on the c-side, so the funcret has to be pop'ed normally. }
|
||||
if not ( (current_procinfo.procdef.proccalloption=pocall_safecall) and
|
||||
(tf_safecall_exceptions in target_info.flags) ) and
|
||||
paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef) then
|
||||
inc(parasize,sizeof(pint));
|
||||
end
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user