You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Say we have a catch_br l in the try instructions of a try...unwind...end instruction (an unwind block), and l is "outside" the unwind block, and an exception is thrown by the try of the try...catch_br l. IIUC, the thrown exception is then caught in the try block with label l, and it seems reasonable to assume that, when unwinding that throw, the cleanup forms of the intermediate unwind block would get triggered. This is how I described the interaction between catch_br and unwind in my draft formal spec for this 3rd EH proposal. Is this the intended behaviour?
A concrete example in case my explanation wasn't clear enough.
i32.const 11
global.set 0
try $l
try
try
throw x
catch_br $l
unwind
i32.const 27
global.set 0
end
catch_all
end
global.get 0
Does the above return 27 (as I would expect), or 11?
The question in general:
Does catch_br l trigger unwind-cleanup code from unwind blocks between itself and its destination label l?