Re: Add a guard against uninitialized default locale

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add a guard against uninitialized default locale
Date: 2026-05-14 22:00:46
Message-ID: 497296e5b4ccdcbec80607beda7f18abbcc1a254.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2026-04-24 at 15:44 -0700, Jeff Davis wrote:
> Not known to be reachable after dbf217c1c7, but defend against
> similar
> issues in the future. For instance, an extension might encounter the
> problem by calling pg_newlocale_from_collation(DEFAULT_COLLATION_OID)
> from _PG_init(), and end up with a NULL pointer dereference.
>
> Backport through 17, though patch is different in 17 (also attached).

I plan to commit and backport this soon.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2026-05-14 22:17:17 Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings.
Previous Message Jeff Davis 2026-05-14 21:58:07 Re: Refactor: allow pg_strncoll(), etc., to accept -1 length for NUL-terminated cstrings.