From: Pavel H. <pav...@st...> - 2002-10-16 09:12:15
|
< .. long talk about sjlj vs. dwarf C++ exceptions in Win32 snipped .. > > need to be either considered as trade-offs or fixed somehow. Does anyone > know how the MSVC compiler and libraries handle both these issues? Perhaps > they use an sjlj type of exceptions but rely on the C++ library being built > as a DLL so that exceptions can cross DLL boundaries? C++ exceptions in MSVC are based on SEH; all C++ exceptions are mapped to SEH exception (using SEH exception code 0xe06d7363). From looking at compiled function prologue, I'd say that this model resembles sjlj-exceptions a bit more than dwarf-exceptions (at least frame-registration code is present in the function prologue, which is AFAIK sjlj-type style of doing things). OTOH, from my experience, it is not safe to let exception go through windows code anyway. Sometimes it works, but in many times it does not, even with MSVC (most painful example is that throwing exception from window or dialog procedure, hoping that it will be caught after DialogBox() or DispatchMessage() methods is highly unreliable - results depend on type of window/dialog and OS used). Having said that, I'd vote for leaving dwarf-exceptions together with inability to throw them from callbacks called by windows functions.. Pavel P.S.: I wrote what I know about the topic, but EH is so complicated in win32 that I'm not completely sure that I understood everything 100% correct.. |