libpq fails to build with TSAN

From: Roman Lozko <lozko(dot)roma(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: libpq fails to build with TSAN
Date: 2024-01-31 03:21:27
Message-ID: CAEhC_BmNGKgj2wKArH2EAU11BsaHYgLnrRFJGRm5Vs8WJzyiQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, so libpq has this line in its Makefile
https://github.com/postgres/postgres/blob/6ee26c6a4bafabbd22a85f575d2446fd5ec6ad0d/src/interfaces/libpq/Makefile#L116
which checks that libpq does not use any "exit" functions. With
ThreadSanitizer it triggers on function `__tsan_func_exit` which is
used to record returns from functions. Should it be added to exclusion
list here?

Error looks like this, just in case:
...
rm -f libpq.so
ln -s libpq.so.5.15 libpq.so
libpq.so.5.15: U __tsan_func_exit
libpq must not be calling any function which invokes exit
make: *** [Makefile:121: libpq-refs-stamp] Error 1

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-31 03:34:01 Re: Parallelize correlated subqueries that execute within each worker
Previous Message Amit Kapila 2024-01-31 03:18:40 Re: Synchronizing slots from primary to standby