Hello Hackers,
While reproducing a static linking issue between libpq and libcrypto.a,
I observed that the Makefile's symbol check incorrectly reports missing
exit() symbols because 'grep exit' also matches 'atexit' and
'OPENSSL_atexit', etc.
As discussed in the thread by Michael Paquier
(https://www.postgresql.org/message-id/aQA1obboZFjqjaBI%40paquier.xyz),
it seems a related fix was committed earlier. However, I was able to
reproduce this issue again using PostgreSQL 18 (latest release).
Steps to reproduce:
nm -A -u ./src/interfaces/libpq/libpq.a /usr/lib/x86_64-linux-gnu/libcrypto.a 2>/dev/null | grep -v __cxa_atexit | grep exit
Output:
/usr/lib/x86_64-linux-gnu/libcrypto.a:libcrypto-lib-init.o: U atexit
/usr/lib/x86_64-linux-gnu/libcrypto.a:libdefault-lib-rand_unix.o: U OPENSSL_atexit
This falsely triggers an undefined exit() error.
[1]Changing the grep pattern to match the exact symbol ('grep -x exit') prevents
such false positives.
[2]Alternatively, excluding pthread_exit() (similar to
__cxa_atexit) would also avoid the issue.
Expected (after fix):
no output — no false positives.
Patch attached.I would love to hear any suggestions from the committers.
Best regards,
Vasuki M
CDAC Chennai.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера