From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ivan Panchenko <wao@mail.ru>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: jsonb_plperl bug
Date: Fri, 02 Aug 2019 18:39:50 -0400
Message-ID: <32324.1564785590@sss.pgh.pa.us> (raw)
In-Reply-To: <1564783533.324795401@f193.i.mail.ru>
References: <1564783533.324795401@f193.i.mail.ru>
=?UTF-8?B?SXZhbiBQYW5jaGVua28=?= <wao@mail.ru> writes:
> I have found a bug in jsonb_plperl extension. A possible fix is proposed below.
> ...
> + /* SVt_PV without POK flag is also NULL */
> + if(SvTYPE(in) == SVt_PV)
Ugh. Doesn't Perl provide some saner way to determine the type of a SV?
The core code seems to think that SvOK() is a sufficient test for an
undef. Should we be doing that before the switch, perhaps?
(My underlying concern here is mostly about whether we have other
similar bugs. There are a lot of places checking SvTYPE.)
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, wao@mail.ru, pgsql-hackers@lists.postgresql.org
Subject: Re: jsonb_plperl bug
In-Reply-To: <32324.1564785590@sss.pgh.pa.us>
* 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