Re: Support json_errdetail in FRONTEND builds

Поиск
Список
Период
Сортировка
Искать
От
Daniel Gustafsson
Тема
Re: Support json_errdetail in FRONTEND builds
Дата
Msg-id
CA5E9481-D63A-41BF-B4A5-88046A6195E0@yesql.se
Ответ на
Список
Дерево обсуждения
Support json_errdetail in FRONTEND builds Jacob Champion <jacob.champion@enterprisedb.com>
Re: Support json_errdetail in FRONTEND builds Andrew Dunstan <andrew@dunslane.net>
Re: Support json_errdetail in FRONTEND builds Michael Paquier <michael@paquier.xyz>
Re: Support json_errdetail in FRONTEND builds Jacob Champion <jacob.champion@enterprisedb.com>
Re: Support json_errdetail in FRONTEND builds Michael Paquier <michael@paquier.xyz>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Michael Paquier <michael@paquier.xyz>
Re: Support json_errdetail in FRONTEND builds Tom Lane <tgl@sss.pgh.pa.us>
Re: Support json_errdetail in FRONTEND builds Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Tom Lane <tgl@sss.pgh.pa.us>
Re: Support json_errdetail in FRONTEND builds Andrew Dunstan <andrew@dunslane.net>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Andrew Dunstan <andrew@dunslane.net>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Tom Lane <tgl@sss.pgh.pa.us>
Re: Support json_errdetail in FRONTEND builds Daniel Gustafsson <daniel@yesql.se>
Re: Support json_errdetail in FRONTEND builds Jacob Champion <jacob.champion@enterprisedb.com>
Re: Support json_errdetail in FRONTEND builds Michael Paquier <michael@paquier.xyz>
Re: Support json_errdetail in FRONTEND builds Michael Paquier <michael@paquier.xyz>
> On 15 Mar 2024, at 01:10, Michael Paquier  wrote:
> 
> On Thu, Mar 14, 2024 at 10:56:46AM +0100, Daniel Gustafsson wrote:
>> +	/* don't allow destroys of read-only StringInfos */
>> +	Assert(str->maxlen != 0);
>> Considering that StringInfo.c don't own the memory here I think it's warranted
>> to turn this assert into an elog() to avoid the risk of use-after-free bugs.
> 
> Hmm.  I am not sure how much protection this would offer, TBH.

I can't see how refusing to free memory owned and controlled by someone else,
and throwing an error if attempted, wouldn't be a sound defensive programming
measure.

--
Daniel Gustafsson



В списке pgsql-hackers по дате отправления
От: Heikki Linnakangas
Дата:
Сообщение: Re: Weird test mixup
От: Sutou Kouhei
Дата:
FAQ