Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9l6O-0000Vh-VV for pgsql-bugs@postgresql.org; Thu, 06 Sep 2012 23:03:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T9l6L-0004fz-K1 for pgsql-bugs@postgresql.org; Thu, 06 Sep 2012 23:03:12 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q86N36uX021329; Thu, 6 Sep 2012 19:03:06 -0400 (EDT) From: Tom Lane To: Marko Tiikkaja , pgsql-bugs@postgresql.org Subject: Re: BUG #7516: PL/Perl crash In-reply-to: <19980.1346970380@sss.pgh.pa.us> References: <1194.1346688396@sss.pgh.pa.us> <5047BA9C.2040405@joh.to> <19980.1346970380@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 06 Sep 2012 18:26:20 -0400" Date: Thu, 06 Sep 2012 19:03:05 -0400 Message-ID: <21328.1346972585@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201209/59 X-Sequence-Number: 34054 I wrote: > Another thing that seems a bit risky is that plperl_func_handler sets up > current_call_data as a pointer to a mostly-zeroed struct and then does > assorted things that could throw error. That would leave a dangling > value of current_call_data ... Meh, scratch that --- I missed that the caller of plperl_func_handler is where there's a PG_TRY block that's responsible for restoring the old value of current_call_data. It would still be interesting to nose around and see what's in *current_call_data, as well as any of the pointed-to data structures that exist. regards, tom lane