Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htgDM-0000TW-Hi for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 22:39:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1htgDL-0006O8-D6 for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Aug 2019 22:39:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1htgDL-0006Ht-0E for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2019 22:39:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1htgDI-0000C4-PA for pgsql-hackers@lists.postgresql.org; Fri, 02 Aug 2019 22:39:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x72MdoPd032325; Fri, 2 Aug 2019 18:39:50 -0400 From: Tom Lane To: =?UTF-8?B?SXZhbiBQYW5jaGVua28=?= cc: pgsql-hackers@lists.postgresql.org Subject: Re: =?UTF-8?B?anNvbmJfcGxwZXJsIGJ1Zw==?= In-reply-to: <1564783533.324795401@f193.i.mail.ru> References: <1564783533.324795401@f193.i.mail.ru> Comments: In-reply-to =?UTF-8?B?SXZhbiBQYW5jaGVua28=?= message dated "Sat, 03 Aug 2019 01:05:33 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32323.1564785590.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 02 Aug 2019 18:39:50 -0400 Message-ID: <32324.1564785590@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?UTF-8?B?SXZhbiBQYW5jaGVua28=3D?=3D 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) =3D=3D 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