Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMb9B-0006Ci-R4 for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Feb 2022 19:48:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nMb9A-000084-9R for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Feb 2022 19:48:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMb9A-00007v-1B for pgsql-bugs@lists.postgresql.org; Tue, 22 Feb 2022 19:48:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMb97-0001J4-1h for pgsql-bugs@lists.postgresql.org; Tue, 22 Feb 2022 19:48:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 21MJmMXl821294; Tue, 22 Feb 2022 14:48:22 -0500 From: Tom Lane To: Mark Murawski cc: pgsql-bugs@lists.postgresql.org Subject: Re: Bug plperl.c In-reply-to: <9acdf918-7fff-4f40-f750-2ffa84f083d2@intellasoft.net> References: <9acdf918-7fff-4f40-f750-2ffa84f083d2@intellasoft.net> Comments: In-reply-to Mark Murawski message dated "Tue, 22 Feb 2022 12:49:26 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <821292.1645559302.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 22 Feb 2022 14:48:22 -0500 Message-ID: <821293.1645559302@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mark Murawski 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