Prev: C++ project using postgresql source
Next: incorrect exit code from psql with single transaction + violation of deferred FK constraint
From: Tom Lane on 7 Mar 2010 12:11 Tim Bunce <Tim.Bunce(a)pobox.com> writes: > 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". Hmm. Seems like this patch begs the question: if checking SvTYPE(*svp) isn't safe, why is it safe to look at SvTYPE(SvRV(*svp))? Shouldn't the tests against SVt_PVHV be made more abstract as well? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Tom Lane on 9 Mar 2010 17:37
Tim Bunce <Tim.Bunce(a)pobox.com> writes: > 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. Applied back to 8.0. 7.4 seems not to contain any tests of this form. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |