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:
https://stackoverflow.com/questions/17967597/obtaining-current-gcc-exception-model
https://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-seh (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
1
2
3
4
5
6
7
8
.L4:
	addq	$56, %rsp
	popq	%rbx
	popq	%rbp
	ret
	.def	__gxx_personality_seh0;	.scl	2;	.type	32;	.endef
	.seh_handler	__gxx_personality_seh0, @unwind, @except
	.seh_handlerdata


210th post woo
Last edited on
https://gcc.gnu.org/wiki/WindowsGCCImprovements
https://www.usenix.org/legacy/events/osdi2000/wiess2000/full_papers/dinechin/dinechin_html/

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.