Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault - Mailing list pgsql-bugs

From Tender Wang
Subject Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault
Date
Msg-id CAHewXNmSvzsSqqf6fG7OEkmB2aUuCa7SM4pfVrs9vBeCWZu7yQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-bugs


Amit Langote <amitlangote09@gmail.com> 于2024年10月16日周三 08:35写道:
On Wed, Oct 16, 2024 at 9:19 AM Michael Paquier <michael@paquier.xyz> wrote:
> On Tue, Oct 15, 2024 at 11:00:01AM +0000, PG Bug reporting form wrote:
> > First bad commit for this anomaly is b6e1157e7.
>
> Amit, any thoughts?

Will look into it, thanks.

Hi,

I debug this issue, and I find that:
after  b6e1157e7,  we shouldn't walk JsonValueExpr.raw_expr in expression_tree_walker_impl(), which
is called in preprocess_aggrefs().

I try to above solution, no crashed again.


--
Thanks,
Tender Wang

pgsql-bugs by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: Performance Issue on Query 18 of TPC-H Benchmark
Next
From: Tender Wang
Date:
Subject: Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault