Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption
Date
Msg-id 0eeb42d7-f4a7-46c4-8886-7b6fa016a484@proxel.se
Whole thread Raw
In response to Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 3/3/26 5:13 AM, Michael Paquier wrote:
> On Tue, Mar 03, 2026 at 04:39:43AM +0100, Andreas Karlsson wrote:
>> Shouldn't the patch have used repalloc_array()? If the code had done so in
>> the first place the bug would never have happened.
> 
> I was considering that first.  However, after looked at the
> MemoryContextAlloc() and the inconsistency that repalloc_array() was
> bringing, I have turned the thought away.

Ah, makes sense but then the question is if we should make 
MemoryContextAlloc() more consistent with palloc() but that is a bigger 
question than just this small bugfix.

Andreas




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption
Next
From: Jeff Davis
Date:
Subject: Re: Use pg_icu_unicode_version(void) instead of pg_icu_unicode_version()