* in case of finally nodes of implicit frames with a third=nil, exit has to load 0 into the exception value, so an explicit exit call is not handled as an exception

git-svn-id: branches/debug_eh@41318 -
This commit is contained in:
florian 2019-02-14 22:30:40 +00:00
parent a91f009b7e
commit a3594574ca

View File

@ -87,7 +87,7 @@ interface
envbuf,
reasonbuf : treference;
{ when using dwarf based eh handling, the landing pads get the unwind info passed, it is
stored in the given register so it can be passed to unwind_resum }
stored in the given register so it can be passed to unwind_resume }
unwind_info : TRegister;
end;
@ -1427,11 +1427,7 @@ implementation
function tcgtryfinallynode.get_jump_out_of_try_finally_frame_label(const finallyexceptionstate: tcgexceptionstatehandler.texceptionstate): tasmlabel;
begin
if implicitframe and
not assigned(third) then
result:=finallyexceptionstate.exceptionlabel
else
current_asmdata.getjumplabel(result);
current_asmdata.getjumplabel(result);
end;
@ -1615,6 +1611,8 @@ implementation
handle_safecall_exception
else
cexceptionstatehandler.handle_reraise(current_asmdata.CurrAsmList,excepttemps,finallyexceptionstate,exceptframekind);
{ we have to load 0 into the execepttemp, else the program thinks an exception happended }
emit_jump_out_of_try_finally_frame(current_asmdata.CurrAsmList,0,finallyexceptionstate.exceptionlabel,excepttemps,exitfinallylabel);
end
else
begin