Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 245DC63557D for ; Fri, 5 Jun 2009 10:54:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 42317-03-7 for ; Fri, 5 Jun 2009 10:53:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id A31BF6352E4 for ; Fri, 5 Jun 2009 10:53:56 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id n55Drrd18136; Fri, 5 Jun 2009 09:53:53 -0400 (EDT) From: Bruce Momjian Message-Id: <200906051353.n55Drrd18136@momjian.us> Subject: Re: Re: [COMMITTERS] pgsql: Initialise perl library as documented in perl API. In-Reply-To: <4A292199.6030201@dunslane.net> To: Andrew Dunstan Date: Fri, 5 Jun 2009 09:53:53 -0400 (EDT) CC: Tom Lane , pgsql-hackers@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.092 tagged_above=0 required=5 tests=AWL=0.092 X-Spam-Level: X-Archive-Number: 200906/468 X-Sequence-Number: 139523 Andrew Dunstan wrote: > [hours of digging later] > > On FBSD at least, this is failing in the function Perl_do_taint(). I > can't see anything too terrible in the source for this, but to dig > further I'd have to build another perl with debugging turned on. Anyway, > it turns out that this actually isn't called at all if Perl is > configured to use its own malloc() routines instead of those supplied by > the system, as is the case on Fedora, for example, but not FBSD. > > So we have a bit of a dilemma. We know that this initialization is > required by the Perl API, and we know that some platforms fail without > it, and we also know that this fails on some platforms which use the > system's malloc() for perl. > > I think we need to float a bug upstream to the perl guys on this, but as > a holding position I suggest that we alter the #ifdef test to avoid > calling PERL_SYS_INIT3() where MYMALLOC is defined. It's ugly, but I > can't think of another simple way around it (and we've done worse things > to accommodate platform weirdness ;-) ) > > BTW, it's not caused by passing NULL as the third argument of > PERL_SYS_INIT3() - changing that was the first thing I tried. I think with an extensive C comment that is acceptable at this point, at least until we hear from the perl guys. I would think projects would have hit this issue too. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +