Re: BUG #19382: Server crash at __nss_database_lookup

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: dllggyx(at)outlook(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19382: Server crash at __nss_database_lookup
Date: 2026-01-20 09:15:11
Message-ID: CALdSSPh--kHOv_OokqEZO5sgAxyZf2p6JWNP_dkdpSXSJ6nBqw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 20 Jan 2026 at 13:58, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 19382
> Logged by: Yuxiao Guo
> Email address: dllggyx(at)outlook(dot)com
> PostgreSQL version: 17.7
> Operating system: Ubuntu 20.04 x86-64, docker image postgres:17.7
> Description:
>
> Hi, I found a crash in PostgreSQL. Here are the details:
>
> PoC:
> DROP FUNCTION IF EXISTS bar();
> DROP TYPE IF EXISTS foo CASCADE;
> CREATE TYPE foo AS (a INT, b INT);
> CREATE FUNCTION bar() RETURNS RECORD AS $$
> DECLARE
> r foo := ROW(123, power(2, 30));
> BEGIN
> ALTER TYPE foo ALTER ATTRIBUTE b TYPE TEXT;
> RETURN r;
> END;
> $$ LANGUAGE plpgsql;
> SELECT bar();
>
> DROP TYPE IF EXISTS foo CASCADE;
> CREATE TYPE foo AS (a INT, b INT);
> BEGIN;
> DECLARE c CURSOR FOR SELECT (i, power(2, 30))::foo FROM
> generate_series(1,10) i;
> FETCH c;
> ALTER TYPE foo ALTER ATTRIBUTE b TYPE TEXT;
> FETCH c;
> COMMIT;
>
>
> Stacktrace:
> #0 0x7182a7813b38 (__nss_database_lookup+0x284b8)
> #1 0x91c9e5 (textout+0x85)
> #2 0x94cbd3 (OutputFunctionCall+0x33)
> #3 0x8db524 (record_out+0x244)
> #4 0x94cbd3 (OutputFunctionCall+0x33)
> #5 0x49fafc (printtup+0x2bc)
> #6 0x7fc888 (RunFromStore+0xa8)
> #7 0x7fbeb5 (PortalRunSelect+0x75)
> #8 0x7fbbbe (PortalRun+0x16e)
> #9 0x7fadd5 (exec_simple_query+0x585)
> #10 0x7f8929 (PostgresMain+0x949)
> #11 0x7f45bf (BackendMain+0x3f)
> #12 0x75df24 (postmaster_child_launch+0x94)
> #13 0x762101 (ServerLoop+0x1d61)
> #14 0x75faab (PostmasterMain+0xd8b)
> #15 0x6a3349 (main+0x2f9)
> #16 0x7182a76ac083 (__libc_start_main+0xf3)
> #17 0x49006e (_start+0x2e)
>
>
>
>

reproduced here on HEAD

--
Best regards,
Kirill Reshke

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kirill Reshke 2026-01-20 09:25:00 Re: BUG #19382: Server crash at __nss_database_lookup
Previous Message Andrey Borodin 2026-01-20 09:15:09 Re: BUG #19383: Server crash at getmissingattr