postgresql/src/interfaces
Tom Lane ba412c905a Avoid ecpglib core dump with out-of-order operations.
If an application executed operations like EXEC SQL PREPARE
without having first established a database connection, it could
get a core dump instead of the expected clean failure.  This
occurred because we did "pthread_getspecific(actual_connection_key)"
without ever having initialized the TSD key actual_connection_key.
The results of that are probably platform-specific, but at least
on Linux it often leads to a crash.

To fix, add calls to ecpg_pthreads_init() in the code paths that
might use actual_connection_key uninitialized.  It's harmless
(and hopefully inexpensive) to do that more than once.

Per bug #17514 from Okano Naoki.  The problem's ancient, so
back-patch to all supported branches.

Discussion: https://postgr.es/m/17514-edd4fad547c5692c@postgresql.org
2022-06-14 18:16:46 -04:00
..
ecpg Avoid ecpglib core dump with out-of-order operations. 2022-06-14 18:16:46 -04:00
libpq Remove misguided SSL key file ownership check in libpq. 2022-05-26 14:14:05 -04:00
Makefile Fix parallel make when running make install before make all 2011-03-08 23:52:29 +02:00