Re: [PATCH] Fix segmentation fault and infinite loop in jsonb_{plperl,plpython}
Aleksander Alekseev <aleksander@tigerdata.com>
From: Aleksander Alekseev <aleksander@tigerdata.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-18T11:46:27Z
Lists: pgsql-hackers
Attachments
- v1-0001-hstore_plperl-Add-CHECK_FOR_INTERRUPTS-in-referen.patch (text/x-patch) patch v1-0001
Hi Tom, > Pushed with some comments added. Thanks for applying the patch. I looked around and found the same bug in hstore_plperl: ``` =# CREATE EXTENSION IF NOT EXISTS hstore_plperl CASCADE; CREATE EXTENSION =# CREATE OR REPLACE FUNCTION hstore_circular() RETURNS hstore LANGUAGE plperl TRANSFORM FOR TYPE hstore AS $$ my $x; $x = \$x; return $x; $$; CREATE FUNCTION =# SELECT hstore_circular(); ^CCancel request sent ^CCancel request sent ^CCancel request sent ``` From what I can tell this is the last issue like this. Here is the patch. Would you like to merge it as well or will it be better to start a new thread for visibility? -- Best regards, Aleksander Alekseev
Commits
-
hstore_plperl: Add CHECK_FOR_INTERRUPTS() in reference-unwinding loop.
- c0f17b04d906 19 (unreleased) landed
- d65cf6f800f0 18 (unreleased) landed
- 60a1d712a472 16 (unreleased) landed
- 4fbbabb0a729 15 (unreleased) landed
- 4efef9d18e63 17 (unreleased) landed
- 1f6b2295f952 14 (unreleased) landed
-
jsonb_plperl, jsonb_plpython: Fix unguarded recursion and loops.
- e3b7a43fa9b6 18 (unreleased) landed
- da82fbb8f9a3 19 (unreleased) landed
- b0f3465b6f6a 16 (unreleased) landed
- a6f23c3ade0e 15 (unreleased) landed
- 639fff5118a8 14 (unreleased) landed
- 3df0b77558d7 17 (unreleased) landed