pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix race condition in gettext() initialization in libpq and ecpg 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix race condition in gettext() initialization in libpq and ecpg @ 2022-01-21 20:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-01-21 20:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix race condition in gettext() initialization in libpq and ecpglib. In libpq and ecpglib, multiple threads can concurrently enter the initialization logic for message localization. Since we set the its-done flag before actually doing the work, it'd be possible for some threads to reach gettext() before anyone has called bindtextdomain(). Barring bugs in libintl itself, this would not result in anything worse than failure to localize some early messages. Nonetheless, it's a bug, and an easy one to fix. Noted while investigating bug #17299 from Clemens Zeidler (much thanks to Liam Bowen for followup investigation on that). It currently appears that that actually *is* a bug in libintl itself, but that doesn't let us off the hook for this bit. Back-patch to all supported versions. Discussion: https://postgr.es/m/17299-7270741958c0b1ab@postgresql.org Discussion: https://postgr.es/m/CAE7q7Eit4Eq2=bxce=Fm8HAStECjaXUE=WBQc-sDDcgJQ7s7eg@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1f655fdc39352c813a83a0a0f1e932af9ef2b6de Modified Files -------------- src/interfaces/ecpg/ecpglib/misc.c | 11 +++++++++-- src/interfaces/libpq/fe-misc.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix race condition in gettext() initialization in libpq and ecpg @ 2022-01-21 20:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-01-21 20:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix race condition in gettext() initialization in libpq and ecpglib. In libpq and ecpglib, multiple threads can concurrently enter the initialization logic for message localization. Since we set the its-done flag before actually doing the work, it'd be possible for some threads to reach gettext() before anyone has called bindtextdomain(). Barring bugs in libintl itself, this would not result in anything worse than failure to localize some early messages. Nonetheless, it's a bug, and an easy one to fix. Noted while investigating bug #17299 from Clemens Zeidler (much thanks to Liam Bowen for followup investigation on that). It currently appears that that actually *is* a bug in libintl itself, but that doesn't let us off the hook for this bit. Back-patch to all supported versions. Discussion: https://postgr.es/m/17299-7270741958c0b1ab@postgresql.org Discussion: https://postgr.es/m/CAE7q7Eit4Eq2=bxce=Fm8HAStECjaXUE=WBQc-sDDcgJQ7s7eg@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f4ebf0dbea835da85c21988321258a587a567dbd Modified Files -------------- src/interfaces/ecpg/ecpglib/misc.c | 11 +++++++++-- src/interfaces/libpq/fe-misc.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix race condition in gettext() initialization in libpq and ecpg @ 2022-01-21 20:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-01-21 20:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix race condition in gettext() initialization in libpq and ecpglib. In libpq and ecpglib, multiple threads can concurrently enter the initialization logic for message localization. Since we set the its-done flag before actually doing the work, it'd be possible for some threads to reach gettext() before anyone has called bindtextdomain(). Barring bugs in libintl itself, this would not result in anything worse than failure to localize some early messages. Nonetheless, it's a bug, and an easy one to fix. Noted while investigating bug #17299 from Clemens Zeidler (much thanks to Liam Bowen for followup investigation on that). It currently appears that that actually *is* a bug in libintl itself, but that doesn't let us off the hook for this bit. Back-patch to all supported versions. Discussion: https://postgr.es/m/17299-7270741958c0b1ab@postgresql.org Discussion: https://postgr.es/m/CAE7q7Eit4Eq2=bxce=Fm8HAStECjaXUE=WBQc-sDDcgJQ7s7eg@mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/64ebb43df068e3a9c01beeaacf7842080c43e712 Modified Files -------------- src/interfaces/ecpg/ecpglib/misc.c | 11 +++++++++-- src/interfaces/libpq/fe-misc.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix race condition in gettext() initialization in libpq and ecpg @ 2022-01-21 20:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-01-21 20:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix race condition in gettext() initialization in libpq and ecpglib. In libpq and ecpglib, multiple threads can concurrently enter the initialization logic for message localization. Since we set the its-done flag before actually doing the work, it'd be possible for some threads to reach gettext() before anyone has called bindtextdomain(). Barring bugs in libintl itself, this would not result in anything worse than failure to localize some early messages. Nonetheless, it's a bug, and an easy one to fix. Noted while investigating bug #17299 from Clemens Zeidler (much thanks to Liam Bowen for followup investigation on that). It currently appears that that actually *is* a bug in libintl itself, but that doesn't let us off the hook for this bit. Back-patch to all supported versions. Discussion: https://postgr.es/m/17299-7270741958c0b1ab@postgresql.org Discussion: https://postgr.es/m/CAE7q7Eit4Eq2=bxce=Fm8HAStECjaXUE=WBQc-sDDcgJQ7s7eg@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5521d8139fbdb15f1bf25afae22e7e6d196669e0 Modified Files -------------- src/interfaces/ecpg/ecpglib/misc.c | 11 +++++++++-- src/interfaces/libpq/fe-misc.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix race condition in gettext() initialization in libpq and ecpg @ 2022-01-21 20:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-01-21 20:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix race condition in gettext() initialization in libpq and ecpglib. In libpq and ecpglib, multiple threads can concurrently enter the initialization logic for message localization. Since we set the its-done flag before actually doing the work, it'd be possible for some threads to reach gettext() before anyone has called bindtextdomain(). Barring bugs in libintl itself, this would not result in anything worse than failure to localize some early messages. Nonetheless, it's a bug, and an easy one to fix. Noted while investigating bug #17299 from Clemens Zeidler (much thanks to Liam Bowen for followup investigation on that). It currently appears that that actually *is* a bug in libintl itself, but that doesn't let us off the hook for this bit. Back-patch to all supported versions. Discussion: https://postgr.es/m/17299-7270741958c0b1ab@postgresql.org Discussion: https://postgr.es/m/CAE7q7Eit4Eq2=bxce=Fm8HAStECjaXUE=WBQc-sDDcgJQ7s7eg@mail.gmail.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/37f5dc8b8cb4c3a58b0cc7df36378a1fdc7a8659 Modified Files -------------- src/interfaces/ecpg/ecpglib/misc.c | 11 +++++++++-- src/interfaces/libpq/fe-misc.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix race condition in gettext() initialization in libpq and ecpg @ 2022-01-21 20:36 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2022-01-21 20:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix race condition in gettext() initialization in libpq and ecpglib. In libpq and ecpglib, multiple threads can concurrently enter the initialization logic for message localization. Since we set the its-done flag before actually doing the work, it'd be possible for some threads to reach gettext() before anyone has called bindtextdomain(). Barring bugs in libintl itself, this would not result in anything worse than failure to localize some early messages. Nonetheless, it's a bug, and an easy one to fix. Noted while investigating bug #17299 from Clemens Zeidler (much thanks to Liam Bowen for followup investigation on that). It currently appears that that actually *is* a bug in libintl itself, but that doesn't let us off the hook for this bit. Back-patch to all supported versions. Discussion: https://postgr.es/m/17299-7270741958c0b1ab@postgresql.org Discussion: https://postgr.es/m/CAE7q7Eit4Eq2=bxce=Fm8HAStECjaXUE=WBQc-sDDcgJQ7s7eg@mail.gmail.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0c7c94f90cd4ee005fac84f30cb7ee5e0c96a835 Modified Files -------------- src/interfaces/ecpg/ecpglib/misc.c | 11 +++++++++-- src/interfaces/libpq/fe-misc.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2022-01-21 20:36 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-01-21 20:36 pgsql: Fix race condition in gettext() initialization in libpq and ecpg Tom Lane <tgl@sss.pgh.pa.us> 2022-01-21 20:36 pgsql: Fix race condition in gettext() initialization in libpq and ecpg Tom Lane <tgl@sss.pgh.pa.us> 2022-01-21 20:36 pgsql: Fix race condition in gettext() initialization in libpq and ecpg Tom Lane <tgl@sss.pgh.pa.us> 2022-01-21 20:36 pgsql: Fix race condition in gettext() initialization in libpq and ecpg Tom Lane <tgl@sss.pgh.pa.us> 2022-01-21 20:36 pgsql: Fix race condition in gettext() initialization in libpq and ecpg Tom Lane <tgl@sss.pgh.pa.us> 2022-01-21 20:36 pgsql: Fix race condition in gettext() initialization in libpq and ecpg Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox