Andres Freund <andres@anarazel.de> writes:
> But more generally: If we allow pthread_exit(), what's the point of this test?
> That's one of the functions we better avoid calling, no?
ATM it's not something we'd be tempted to call, but I take your point.
> ISTM that if we do want to continue having this test, the issue is that we're
> testing the shared library - which will have already linked against static
> libraries like the sanitizer ones or in this case libcrypto. What we ought to
> do is to test the .o files constituting libpq.so, rather than the already
> linked .so. That way we will find our own calls to exit etc, but not ones in
> static libraries.
My recollection is that that doesn't help as much as you'd think.
__tsan_func_exit, for one, can get injected into our own .o files
if we build with appropriate sanitizers enabled.
regards, tom lane