[PATCH] vcruntime140_1: Terminate on noexcept function trying to propagate exception.

Piotr Caban piotr.caban at gmail.com
Wed Sep 30 09:22:34 CDT 2020


Hi Daniel,

On 9/30/20 6:49 AM, Daniel Lehman wrote:
> +    ret = cxx_frame_handler4(rec, frame, context, dispatch, &descr, trylevel);
> +    if (descr.header & FUNC_DESCR_NO_EXCEPT &&
> +        !(rec->ExceptionFlags & (EH_UNWINDING|EH_EXIT_UNWIND)) &&
> +        ret == ExceptionContinueSearch)
> +    {
> +        ERR("noexcept function propagating exception\n");
> +        terminate();
> +    }
This will not work for nested exceptions. You will need to move the 
handling to cxx_frame_handler4 helper.

Here's an example of non-working code (in noexcept function):
try {
     try { throw 1; }
     catch (int e) { throw; }
}
catch (...) {
}

Thanks,
Piotr



More information about the wine-devel mailing list