Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCWqi-0000df-Sg for pgsql-bugs@postgresql.org; Fri, 14 Sep 2012 14:26:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCWqg-0007fP-MP for pgsql-bugs@postgresql.org; Fri, 14 Sep 2012 14:26:28 +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 q8EEQNHZ012945; Fri, 14 Sep 2012 10:26:23 -0400 (EDT) From: Tom Lane To: Marko Tiikkaja cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7516: PL/Perl crash In-reply-to: <5052E4C0.2060004@joh.to> References: <1194.1346688396@sss.pgh.pa.us> <5047BA9C.2040405@joh.to> <16153.1347226320@sss.pgh.pa.us> <17785.1347230278@sss.pgh.pa.us> <504F8034.20802@joh.to> <4011.1347407415@sss.pgh.pa.us> <50506B94.5040003@joh.to> <17684.1347558484@sss.pgh.pa.us> <505229E8.9070507@joh.to> <21173.1347568661@sss.pgh.pa.us> <22390.1347572522@sss.pgh.pa.us> <22854.1347573532@sss.pgh.pa.us> <5052E4C0.2060004@joh.to> Comments: In-reply-to Marko Tiikkaja message dated "Fri, 14 Sep 2012 10:03:12 +0200" Date: Fri, 14 Sep 2012 10:26:23 -0400 Message-ID: <12944.1347632783@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/144 X-Sequence-Number: 34139 Marko Tiikkaja writes: > On 9/13/12 11:58 PM, Tom Lane wrote: >> And on still further investigation, the patch I just applied to HEAD >> seems to make it go away too. Bizarre as can be. If that holds up for >> you, I think back-patching that change is less ugly than making the >> variable non-static. > It does, indeed. I can't reproduce the bug on my end with that patch > applied. Here's what Jakub Jelinek wrote in the RH bugzilla: > That is a glibc bug. While in setjmp.h the __sigsetjmp prototype is properly > marked as non-leaf: > extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) > __THROWNL; > in pthread.h it is incorrectly marked as leaf: > extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW; > When pthread.h is fixed, the testcase works properly. So that explains why including perl.h is relevant. Would you like to try modifying your copy of pthread.h to confirm it's the same situation on Ubuntu? It's probably pure luck that my no-palloc patch dodges the problem, but anyway it seems like a good enough work-around until the glibc issue is fixed. I'll go ahead and back-patch that. regards, tom lane