Re: BUG #5323: plperl and plperlu interaction segfaults

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alexey Klyukin <alexk(at)commandprompt(dot)com>
Cc: Dave Olszewski <cxreg(at)pobox(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5323: plperl and plperlu interaction segfaults
Date: 2010-02-12 03:47:10
Message-ID: 603c8f071002111947h263c61c6x61f5ddf62313d171@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Feb 11, 2010 at 3:12 PM, Alexey Klyukin <alexk(at)commandprompt(dot)com> wrote:
>> I think this might be the same problem previously discussed here:
>> http://archives.postgresql.org/pgsql-bugs/2010-01/msg00224.php
>
> Seems to be the same problem. Backtrace I'm getting on 8.4 is almost identical to the one at the end of this post:
> http://archives.postgresql.org/pgsql-bugs/2010-01/msg00144.php
>
>> Does that patch fix it?
> The problem doesn't appear on 9.0 alpha with that patch committed.

It looks like the plperl.c change applies cleanly back to 8.2, though
I haven't yet verified that it actually fixes the problem on all those
branches. 8.1 does nothing at all instead of decrementing the
reference count:

- /* need we delete old entry? */
+ hash_search(plperl_proc_hash, internal_proname,
+ HASH_REMOVE, NULL);
+ if (prodesc->reference)
+ SvREFCNT_dec(prodesc->reference);
+ free(prodesc->proname);
+ free(prodesc);

I am not inclined to apply the additional regression tests, even on HEAD.

...Robert

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2010-02-12 04:21:35 Re: BUG #5323: plperl and plperlu interaction segfaults
Previous Message Koichi Suzuki 2010-02-11 22:49:03 Re: [GENERAL] [HACKERS] Bug on pg_lesslog