| From: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> |
| Subject: | Core dump running PL/Perl installcheck with bleadperl [PATCH] |
| Date: | 2010-03-05 15:26:51 |
| Message-ID: | 20100305152651.GY1375@timac.local |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| svrok.patch | text/x-patch | 2.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Merlin Moncure | 2010-03-05 15:28:55 | Re: SQL compatibility reminder: MySQL vs PostgreSQL |
| Previous Message | Magnus Hagander | 2010-03-05 15:15:15 | Re: Explicit psqlrc |