Re: BUG #17094: FailedAssertion at planner.c - Mailing list pgsql-bugs

From Richard Guo
Subject Re: BUG #17094: FailedAssertion at planner.c
Date
Msg-id CAMbWs48ypEC6i6eZ77rbBbpmYa5ehuQ_M3TkDTWdieqBWAg=XQ@mail.gmail.com
Whole thread Raw
In response to BUG #17094: FailedAssertion at planner.c  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17094: FailedAssertion at planner.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs

On Thu, Jul 8, 2021 at 5:27 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      17094
Logged by:          yaoguang chen
Email address:      cyg0810@gmail.com
PostgreSQL version: 14beta1
Operating system:   Linux supersix 5.4.0-39-generic #43-Ubuntu SMP Fri
Description:       

run the following sql command through client and the PostgreSQL database
process will crash:

CREATE TABLE v0 ( v4 INT , v3 INT UNIQUE , v2 INT , v1 INT UNIQUE ) ;
 CREATE OR REPLACE RULE v1 AS ON INSERT TO v0 DO INSTEAD NOTIFY COMPRESSION
;
 COPY ( SELECT 32 EXCEPT SELECT v3 + 16 FROM v0 ) TO STDOUT CSV HEADER ;
 WITH v2 AS ( INSERT INTO v0 VALUES ( 0 ) ) DELETE FROM v0 WHERE v3 = - - -
- 48 ;


asan report:

AddressSanitizer:DEADLYSIGNAL=================================================================
==453870==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008


Seems the Query from RewriteRule->actions may have a NULL jointree, and
that triggers the SEGV in replace_empty_jointree().

Thanks
Richard

pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #17089: "ERROR: invalid memory alloc request size ..." occurs when updating a fixed number of records
Next
From: Tom Lane
Date:
Subject: Re: BUG #17094: FailedAssertion at planner.c