Re: BUG #7516: PL/Perl crash - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #7516: PL/Perl crash
Date
Msg-id 12944.1347632783@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #7516: PL/Perl crash  (Marko Tiikkaja <pgmail@joh.to>)
Responses Re: BUG #7516: PL/Perl crash  (Marko Tiikkaja <pgmail@joh.to>)
List pgsql-bugs
Marko Tiikkaja <pgmail@joh.to> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: initdb.exe changes --locale option
Next
From: Dave Page
Date:
Subject: Re: initdb.exe changes --locale option