From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: luy70@psu.edu
Subject: BUG #18879: PostgreSQL returns memory error.
Date: Fri, 04 Apr 2025 19:33:44 +0000
Message-ID: <18879-259fc59d072bd4d7@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18879
Logged by: Yu Liang
Email address: luy70@psu.edu
PostgreSQL version: 17.4
Operating system: Ubuntu 24.04 LTS ARM 64 VM
Description:
The latest version of PostgreSQL, when compiling with release build, return
memory error: `pfree called with invalid pointer` when executing the
following queries:
```sql
DROP DATABASE test123;
CREATE DATABASE test123;
\c test123;
CREATE TABLE v00 (c01 INT, c02 TEXT);
CREATE INDEX i03 ON v00 (c01);
INSERT INTO v00 (c01, c02) VALUES (0, 'abc');
CREATE LOCAL TEMP TABLE IF NOT EXISTS v878825600 ( c878825601 INT
COMPRESSION DEFAULT CONSTRAINT cons_878825602 REFERENCES v878825600 MATCH
SIMPLE ON UPDATE NO ACTION ON DELETE SET DEFAULT ( c878825601, c878825601,
c878825601, c878825601, c878825601, c878825601, c878825601 ) PRIMARY KEY )
ON COMMIT DELETE ROWS;
CREATE LOCAL TEMP TABLE IF NOT EXISTS v878825601 ( c878825601 INT
COMPRESSION DEFAULT CONSTRAINT cons_878825602 REFERENCES v878825600 MATCH
SIMPLE ON UPDATE NO ACTION ON DELETE SET DEFAULT ( c878825601, c878825601,
c878825601, c878825601, c878825601, c878825601, c878825601 ) PRIMARY KEY )
ON COMMIT DELETE ROWS;
CREATE LOCAL TEMP TABLE IF NOT EXISTS v878825602 ( c878825601 INT
COMPRESSION DEFAULT CONSTRAINT cons_878825602 REFERENCES v878825600 MATCH
SIMPLE ON UPDATE NO ACTION ON DELETE SET DEFAULT ( c878825601, c878825601,
c878825601, c878825601, c878825601, c878825601, c878825601 ) PRIMARY KEY )
ON COMMIT DELETE ROWS;
```
In debug build, we also observer an additional assertion failure:
Assert("false"), File:
"/home/postgresql/postgres/bld/../src/backend/access/common/heaptuple.c",
Line: 258
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, luy70@psu.edu
Subject: Re: BUG #18879: PostgreSQL returns memory error.
In-Reply-To: <18879-259fc59d072bd4d7@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox