pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix fat fingering in 22cb6d28950 3+ messages / 2 participants [nested] [flat]
* pgsql: Fix fat fingering in 22cb6d28950 @ 2025-04-10 23:08 Andrew Dunstan <andrew@dunslane.net> 2025-04-11 19:24 ` Re: pgsql: Fix fat fingering in 22cb6d28950 Mahendra Singh Thalor <mahi6run@gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Andrew Dunstan @ 2025-04-10 23:08 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix fat fingering in 22cb6d28950 Per Rainier Vilela Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/39729ec01d25dbe12e0dd8322c68f242650235c9 Modified Files -------------- src/bin/pg_dump/pg_restore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Fix fat fingering in 22cb6d28950 2025-04-10 23:08 pgsql: Fix fat fingering in 22cb6d28950 Andrew Dunstan <andrew@dunslane.net> @ 2025-04-11 19:24 ` Mahendra Singh Thalor <mahi6run@gmail.com> 2025-04-12 18:33 ` Re: pgsql: Fix fat fingering in 22cb6d28950 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 1 reply; 3+ messages in thread From: Mahendra Singh Thalor @ 2025-04-11 19:24 UTC (permalink / raw) To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org On Fri, 11 Apr 2025 at 04:38, Andrew Dunstan <andrew@dunslane.net> wrote: > > Fix fat fingering in 22cb6d28950 > > Per Rainier Vilela > > Branch > ------ > master > > Details > ------- > https://git.postgresql.org/pg/commitdiff/39729ec01d25dbe12e0dd8322c68f242650235c9 > > Modified Files > -------------- > src/bin/pg_dump/pg_restore.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Hi, This seems not a proper fix, rather this is adding a segfault. Program received signal SIGABRT, Aborted. 0x0000153dc3002acf in raise () from /lib64/libc.so.6 (gdb) bt #0 0x0000153dc3002acf in raise () from /lib64/libc.so.6 #1 0x0000153dc2fd5ea5 in abort () from /lib64/libc.so.6 #2 0x0000153dc3043cc7 in __libc_message () from /lib64/libc.so.6 #3 0x0000153dc304afcc in malloc_printerr () from /lib64/libc.so.6 #4 0x0000153dc304d050 in _int_free () from /lib64/libc.so.6 #5 0x0000000000426b74 in pg_free (ptr=0x7fff48145ac0) at fe_memutils.c:107 #6 0x0000000000426bef in pfree (pointer=0x7fff48145ac0) at fe_memutils.c:135 #7 0x000000000042354f in destroyStringInfo (str=0x7fff48145ac0) at stringinfo.c:415 #8 0x00000000004055c6 in read_one_statement (inBuf=0x7fff48145b30, pfile=0x1165ec0) at pg_restore.c:909 #9 0x0000000000406339 in process_global_sql_commands (conn=0x115c9d0, dumpdirpath=0x7fff481491d3 "x1", outfile=0x0) at pg_restore.c:1321 #10 0x0000000000405d43 in restore_all_databases (conn=0x115c9d0, dumpdirpath=0x7fff481491d3 "x1", db_exclude_patterns=..., opts=0x115c750, numWorkers=10) at pg_restore.c:1154 #11 0x0000000000404925 in main (argc=7, argv=0x7fff48147448) at pg_restore.c:555 * To destroy a StringInfo, pfree() the data buffer, and then pfree() the > * StringInfoData if it was palloc'd. For StringInfos created with > * makeStringInfo(), destroyStringInfo() is provided for this purpose. > * However, if the StringInfo was initialized using > initReadOnlyStringInfo() > * then the caller will need to consider if it is safe to pfree the data > * buffer. Here, we are passing &q, but we can't free this by destroyStringInfo(&q); *Fix*: pg_free(q.data) -- Thanks and Regards Mahendra Singh Thalor EnterpriseDB: http://www.enterprisedb.com ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Fix fat fingering in 22cb6d28950 2025-04-10 23:08 pgsql: Fix fat fingering in 22cb6d28950 Andrew Dunstan <andrew@dunslane.net> 2025-04-11 19:24 ` Re: pgsql: Fix fat fingering in 22cb6d28950 Mahendra Singh Thalor <mahi6run@gmail.com> @ 2025-04-12 18:33 ` Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 3+ messages in thread From: Andrew Dunstan @ 2025-04-12 18:33 UTC (permalink / raw) To: Mahendra Singh Thalor <mahi6run@gmail.com>; +Cc: pgsql-committers@lists.postgresql.org On 2025-04-11 Fr 3:24 PM, Mahendra Singh Thalor wrote: > On Fri, 11 Apr 2025 at 04:38, Andrew Dunstan <andrew@dunslane.net> wrote: > > > > Fix fat fingering in 22cb6d28950 > > > > Per Rainier Vilela > > > > Branch > > ------ > > master > > > > Details > > ------- > > > https://git.postgresql.org/pg/commitdiff/39729ec01d25dbe12e0dd8322c68f242650235c9 > > > > Modified Files > > -------------- > > src/bin/pg_dump/pg_restore.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > Hi, > This seems not a proper fix, rather this is adding a segfault. > [...] > Here, we are passing &q, but we can't free this by destroyStringInfo(&q); > > *Fix*: pg_free(q.data) Quite right. Clearly I was not having a good day on Thursday. Will fix. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-04-12 18:33 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-04-10 23:08 pgsql: Fix fat fingering in 22cb6d28950 Andrew Dunstan <andrew@dunslane.net> 2025-04-11 19:24 ` Mahendra Singh Thalor <mahi6run@gmail.com> 2025-04-12 18:33 ` Andrew Dunstan <andrew@dunslane.net>
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