mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 06:09:11 +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
|
if current_procinfo.procdef.proccalloption in clearstack_pocalls then
|
||||||
begin
|
begin
|
||||||
parasize:=0;
|
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));
|
inc(parasize,sizeof(pint));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user