pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Don't leak malloc'd strings when a GUC setting is rejected. 6+ messages / 1 participants [nested] [flat]
* pgsql: Don't leak malloc'd strings when a GUC setting is rejected. @ 2021-03-19 02:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2021-03-19 02:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't leak malloc'd strings when a GUC setting is rejected. Because guc.c prefers to keep all its string values in malloc'd not palloc'd storage, it has to be more careful than usual to avoid leaks. Error exits out of string GUC hook checks failed to clear the proposed value string, and error exits out of ProcessGUCArray() failed to clear the malloc'd results of ParseLongOption(). Found via valgrind testing. This problem is ancient, so back-patch to all supported branches. Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/642b0b69b0638261fe81dfd9ca3b92927496f1cb Modified Files -------------- src/backend/utils/misc/guc.c | 71 +++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Don't leak malloc'd strings when a GUC setting is rejected. @ 2021-03-19 02:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2021-03-19 02:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't leak malloc'd strings when a GUC setting is rejected. Because guc.c prefers to keep all its string values in malloc'd not palloc'd storage, it has to be more careful than usual to avoid leaks. Error exits out of string GUC hook checks failed to clear the proposed value string, and error exits out of ProcessGUCArray() failed to clear the malloc'd results of ParseLongOption(). Found via valgrind testing. This problem is ancient, so back-patch to all supported branches. Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7e25217701cc54d16a2f07df135da3ba43066449 Modified Files -------------- src/backend/utils/misc/guc.c | 71 +++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Don't leak malloc'd strings when a GUC setting is rejected. @ 2021-03-19 02:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2021-03-19 02:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't leak malloc'd strings when a GUC setting is rejected. Because guc.c prefers to keep all its string values in malloc'd not palloc'd storage, it has to be more careful than usual to avoid leaks. Error exits out of string GUC hook checks failed to clear the proposed value string, and error exits out of ProcessGUCArray() failed to clear the malloc'd results of ParseLongOption(). Found via valgrind testing. This problem is ancient, so back-patch to all supported branches. Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fc552f8680a79d602beae230615ffe8ed236cc43 Modified Files -------------- src/backend/utils/misc/guc.c | 71 +++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Don't leak malloc'd strings when a GUC setting is rejected. @ 2021-03-19 02:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2021-03-19 02:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't leak malloc'd strings when a GUC setting is rejected. Because guc.c prefers to keep all its string values in malloc'd not palloc'd storage, it has to be more careful than usual to avoid leaks. Error exits out of string GUC hook checks failed to clear the proposed value string, and error exits out of ProcessGUCArray() failed to clear the malloc'd results of ParseLongOption(). Found via valgrind testing. This problem is ancient, so back-patch to all supported branches. Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/377b7a83007d277d32ef19f7c7590c8668d504cb Modified Files -------------- src/backend/utils/misc/guc.c | 71 +++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Don't leak malloc'd strings when a GUC setting is rejected. @ 2021-03-19 02:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2021-03-19 02:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't leak malloc'd strings when a GUC setting is rejected. Because guc.c prefers to keep all its string values in malloc'd not palloc'd storage, it has to be more careful than usual to avoid leaks. Error exits out of string GUC hook checks failed to clear the proposed value string, and error exits out of ProcessGUCArray() failed to clear the malloc'd results of ParseLongOption(). Found via valgrind testing. This problem is ancient, so back-patch to all supported branches. Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/26a3ae06d85c835c04642c08e304e11821587ad2 Modified Files -------------- src/backend/utils/misc/guc.c | 71 +++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Don't leak malloc'd strings when a GUC setting is rejected. @ 2021-03-19 02:23 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2021-03-19 02:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Don't leak malloc'd strings when a GUC setting is rejected. Because guc.c prefers to keep all its string values in malloc'd not palloc'd storage, it has to be more careful than usual to avoid leaks. Error exits out of string GUC hook checks failed to clear the proposed value string, and error exits out of ProcessGUCArray() failed to clear the malloc'd results of ParseLongOption(). Found via valgrind testing. This problem is ancient, so back-patch to all supported branches. Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5058e95a6ef99e03dd5e41c9cda531cbed721d53 Modified Files -------------- src/backend/utils/misc/guc.c | 71 +++++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 24 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-03-19 02:23 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-03-19 02:23 pgsql: Don't leak malloc'd strings when a GUC setting is rejected. Tom Lane <tgl@sss.pgh.pa.us> 2021-03-19 02:23 pgsql: Don't leak malloc'd strings when a GUC setting is rejected. Tom Lane <tgl@sss.pgh.pa.us> 2021-03-19 02:23 pgsql: Don't leak malloc'd strings when a GUC setting is rejected. Tom Lane <tgl@sss.pgh.pa.us> 2021-03-19 02:23 pgsql: Don't leak malloc'd strings when a GUC setting is rejected. Tom Lane <tgl@sss.pgh.pa.us> 2021-03-19 02:23 pgsql: Don't leak malloc'd strings when a GUC setting is rejected. Tom Lane <tgl@sss.pgh.pa.us> 2021-03-19 02:23 pgsql: Don't leak malloc'd strings when a GUC setting is rejected. 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