SEH vs SJLJ library compatibility

Am I correct in saying that if a GNU library file (libfoo.a) was compiled with a GCC compiler that used the x64 SJLJ exception model, it will not be compatible with a project I am trying to build using x64 SEH exception model?

Following links for reference: (a bit outdated because GCC does now support SEH, it seems)

I have determined that my g++ program compiles a program as SEH because the assembly looks like
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	.def	__gxx_personality_seh0;	.scl	2;	.type	32;	.endef
	.seh_handler	__gxx_personality_seh0, @unwind, @except

210th post woo
Last edited on

From those docs, it seems the SJLJ method requires the maintenance of a linked list of objects to be destroyed when the exception is thown. I think, if you mix SJLJ/SEH models in the same program, it's possible for some objects to not be placed in this list. So, it's possible that not all objects on the call stack will be destroyed. That aside, it should be ok, linking issues aside.
Thanks. I've been trying to (on and off for the past week, after work) install libav so can render some videos, and the lack of documentation for msys/windows installation or dependencies for pre-built downloads is driving me a bit crazy. But not giving up yet... until next time.
Registered users can post here. Sign in or register to post.