On Sun Nov 2 15:41:53 2025 +0000, Vibhav Pant wrote:
Everything looks good, thank you!
Increasing exception object reference on throw looks strange. Do you
know what's the rationale behind it? I see that it matches with Windows, I don't understand why it's needed. My initial hypothesis was that it expects the `catch` block to call `Release` on the exception object, but I don't see such a call in disassembled C++/CX code. I can't imagine `__DestructExceptionObject` will call `Release` twice, so a `Release` is happening somewhere between the two points, hopefully it's the app's responsibility (and codegen'd by MSVC) and not the runtime, otherwise we're probably leaking exceptions :/
I've done some more tests looking into WinRT exception leaks. In the tests I have written we're leaking 2 references if builtin vccorlib140 and vcruntime140 is used. We're getting down to 1 reference being leaked when one of the dlls is native. There's no leak if both dlls are native. I think we need to understand it better before the change can get into wine.