Re: Bug plperl.c
Mark Murawski <markm-lists@intellasoft.net>
From: Mark Murawski <markm-lists@intellasoft.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-02-22T20:06:19Z
Lists: pgsql-bugs
Hi Tom, Wow that was fast! Upon further testing, my path isn't a full fix... there's other parts of the flow that needs current_call_data I trimmed down my example from the guts of a complex application. Sorry I didn't re-test with the trimmed example. But the use-case is very much the same... it has to do with running spi_exec_query during parse time. I'll work on redoing the example to reproduce the crash. On 2/22/22 14:48, Tom Lane wrote: > Mark Murawski <markm-lists@intellasoft.net> writes: >> Affects Versions: 12 (and probably all others) >> Steps to Reproduce: >> - Run a query during plperl validation -- ie: inside a warn handler >> 2022-02-22 12:17:04 EST - - - - 12950 - - 0 - LOG: server process >> (PID 19702) was terminated by signal 11: Segmentation fault > I couldn't reproduce this, either in HEAD or 12.10. However, maybe > there's something faulty about your example, because in my hands it > doesn't seem that plperl_spi_exec is reached at all. > > If we do need to do something here, my inclination would be to > reject execution of any SPI operations during validation. That's > not a case that's supposed to have any side-effects. > > regards, tom lane
Commits
-
Disallow execution of SPI functions during plperl function compilation.
- 31befa6be620 11.16 landed
- 0f7b62f29d16 12.11 landed
- 9b2d762a283d 13.7 landed
- ac910bb2328f 14.3 landed
- 638300fef541 15.0 landed
- 4936747c4772 10.21 landed