pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Demoor <jdemoor@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #5835: PL/Python crashes
Date: Sun, 16 Jan 2011 13:55:43 +0100
Message-ID: <001301cbb57c$b018ab50$104a01f0$@com> (raw)
In-Reply-To: <AANLkTi=6subm+p_zaStpLqJH7O0KGVyngjk0x59=P8hY@mail.gmail.com>
References: <201101131357.p0DDvT8E039516@wwwmaster.postgresql.org>
	<AANLkTi=6subm+p_zaStpLqJH7O0KGVyngjk0x59=P8hY@mail.gmail.com>

I just tried and it works. Thank you very much.

-----Message d'origine-----
De : Alex Hunsaker [mailto:badalex@gmail.com] 
Envoyé : vendredi 14 janvier 2011 07:33
À : Julien Demoor
Cc : pgsql-bugs@postgresql.org
Objet : Re: [BUGS] BUG #5835: PL/Python crashes

On Thu, Jan 13, 2011 at 06:57, Julien Demoor <jdemoor@gmail.com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5835
> Logged by:          Julien Demoor
> Email address:      jdemoor@gmail.com
> PostgreSQL version: 9.0.2
> Operating system:   Ubuntu Linux
> Description:        PL/Python crashes
> Details:

> BEGIN;
> CREATE OR REPLACE FUNCTION test_none_3(a numeric[]) RETURNS 
> numeric(12,4) AS $$
>    return 1;
> $$ LANGUAGE plpython2u;
> SELECT test_none_3('{NULL, NULL, NULL}'::numeric[]) FROM
> generate_series(1,244) ORDER BY generate_series DESC LIMIT 1; 
> ROLLBACK;

It looks like we are not incrementing a reference count for NULL entries in an array.  The attached fixes it for me.  I did look for other places where we might have missed this and did not find any.  ( the PyDict_SetItemString() that use Py_None look fishy, but apparently work ).

Can you see if it fixes it for you?




view thread (4+ messages)  latest in thread

Message-ID: <001301cbb57c$b018ab50$104a01f0$@com>
Permalink:  ../001301cbb57c$b018ab50$104a01f0$@com/
Also on:    postgresql.org/message-id/001301cbb57c$b018ab50$104a01f0$@com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: jdemoor@gmail.com
  Subject: Re: BUG #5835: PL/Python crashes
  In-Reply-To: <001301cbb57c$b018ab50$104a01f0$@com>
  References: <201101131357.p0DDvT8E039516@wwwmaster.postgresql.org> <AANLkTi=6subm+p_zaStpLqJH7O0KGVyngjk0x59=P8hY@mail.gmail.com> <001301cbb57c$b018ab50$104a01f0$@com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox