| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Residual cleanups for tied objects in PL/Perl |
| Date: | 2026-08-16 18:47:47 |
| Message-ID: | 7e5de9c1-e2fe-44d2-9df3-670c6678e52b@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 2026-08-16 Su 1:38 PM, Tom Lane wrote:
> The attached patch fixes a null pointer dereference case in
> hstore_plperl, and an infinite-loop case in plperl itself.
> These were left out of the recent plperl security patch because
> they are not security matters according to our current rules;
> but they are certainly bugs that ought to be fixed.
>
> The test cases I have that reach these bugs require Perl "Tie"
> modules that aren't present in common Perl installations,
> so I'm not planning on trying to construct regression test
> entries for them. But I've attached two SQL scripts that
> cause failures without the patch.
Which modules?
>
> One interesting point is that Claude Opus, which constructed
> these test cases, seemed to think that we ought to be able
> to read out the values assigned to the tied array or hash.
> But what the repaired code actually produces is SQL NULLs.
> AFAICT we are getting Perl "undef" values out of hv_iternext
> or av_fetch, so it's hard to see how we could do any better.
At first glance I'm inclined to agree with Opus.
>
> I think what is going on here is that the test functions are
> failing to install enough infrastructure for the tied object
> to produce any output, but maybe someone who knows more Perl
> than me can correct that guess.
>
>
I wonder if it's conflicting with our opcode restrictions. I'll play
around a bit with it.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-08-16 19:04:30 | Re: Residual cleanups for tied objects in PL/Perl |
| Previous Message | Mats Kindahl | 2026-08-16 18:42:33 | Re: Batching in executor |