ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

Within ACE_SEH_TRY block only operations may be called

Open jwillemsen opened this issue 2 years ago • 4 comments

clang on windows doesn't support non-call SEH, within an ACE_SEH_TRY block only operations may be called and within the operation maybe a SEH can be thrown, directly within the ACE_SEH_TRY no SEH should be thrown as clang on Windows can't handle that. See https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/tests/Compiler_Features_39_Test.cpp as an example, https://github.com/DOCGroup/ACE_TAO/blob/9bb6d09a13922f1b03f02b695f41f94a808a9517/ACE/tests/Compiler_Features_39_Test.cpp#L53 is something that shouldn't be done as clang can't support it

jwillemsen avatar Sep 20 '22 11:09 jwillemsen

Could you clarify what "only operations may be called" means? Is there clang documentation for this?

mitza-oci avatar Oct 28 '22 16:10 mitza-oci

See https://discourse.llvm.org/t/exceptions-on-windows-msvc/53648 https://discourse.llvm.org/t/exceptions-on-windows-msvc/53648 https://clang.llvm.org/docs/MSVCCompatibility.html https://discourse.llvm.org/t/seh-unwind-info-for-function-dividing-by-zero/48276

jwillemsen avatar Oct 30 '22 08:10 jwillemsen

So it just has to have a stack frame between the try and the exception. Are there places in the ACE_TAO code (not tests) that depend on it working more generally? We could have those use an immediately-invoked lambda on this compiler.

mitza-oci avatar Oct 30 '22 16:10 mitza-oci

I once did a quick scan some time ago and I think we need to update a few places, that is why I created this issue as reminder

jwillemsen avatar Oct 31 '22 07:10 jwillemsen