Re: BUG #19095: Test if function exit() is used fail when linked static

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #19095: Test if function exit() is used fail when linked static
Дата
Msg-id 3133108.1763131246@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #19095: Test if function exit() is used fail when linked static  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления: