Core dump running PL/Perl installcheck with bleadperl [PATCH] - Mailing list pgsql-hackers

From Tim Bunce
Subject Core dump running PL/Perl installcheck with bleadperl [PATCH]
Date
Msg-id 20100305152651.GY1375@timac.local
Whole thread Raw
Responses Re: Core dump running PL/Perl installcheck with bleadperl [PATCH]
Re: Core dump running PL/Perl installcheck with bleadperl [PATCH]
List pgsql-hackers
I encountered a core dump running PL/Perl installcheck with a very
recent git HEAD of PostgreSQL and a not quite so recent git HEAD of perl.

The cause is a subtle difference between SvTYPE(sv) == SVt_RV and
SvROK(sv). The former is checking a low-level implementation detail
while the later is directly checking "does this sv contains a reference".

The attached patch fixes the problem by changing the SvTYPE check to use
SvROK instead. Although I only tripped over one case, the patch changes
all four uses of SvTYPE(sv) == SVt_RV. The remaining uses of SvTYPE are ok.

Tim.


Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Explicit psqlrc
Next
From: Merlin Moncure
Date:
Subject: Re: SQL compatibility reminder: MySQL vs PostgreSQL