Re: reallocing without oom check in pg_regress

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: reallocing without oom check in pg_regress
Date: 2022-02-24 20:00:05
Message-ID: 16E343D8-1754-427B-9158-BAB63CC0DEC1@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 23 Feb 2022, at 23:05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> In pg_regress we realloc() with the destination and source pointer being equal,
>> without checking for OOM. While a fairly unlikely source of errors, is there a
>> reason not to use pg_realloc() there for hygiene?
>
> Yeah, looks like oversight to me.

Thanks for confirming, I've pushed this now after taking it for a spin on the
CI just in case.

--
Daniel Gustafsson https://vmware.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2022-02-24 20:35:38 Re: Logical insert/update/delete WAL records for custom table AMs
Previous Message Justin Pryzby 2022-02-24 19:35:20 Re: document that brin's autosummarize parameter is off by default