Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 136251D7D623 for ; Fri, 20 Apr 2012 12:23:24 -0300 (ADT) Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SLFg9-0005W7-W6 for pgsql-bugs@postgresql.org; Fri, 20 Apr 2012 15:23:23 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SLFfv-000322-9Q for pgsql-bugs@postgresql.org; Fri, 20 Apr 2012 08:23:07 -0700 Date: Fri, 20 Apr 2012 08:23:07 -0700 (PDT) From: ljwilson To: pgsql-bugs@postgresql.org Message-ID: <1334935387285-5654505.post@n5.nabble.com> In-Reply-To: <1334863867904-5652595.post@n5.nabble.com> References: <4E933F4B.1080501@hogranch.com> <1324485031237-5092359.post@n5.nabble.com> <1324502463083-5092951.post@n5.nabble.com> <1334055689658-5629612.post@n5.nabble.com> <1334842206353-5651759.post@n5.nabble.com> <1334863867904-5652595.post@n5.nabble.com> Subject: Re: BUG #6204: Using plperl functions generate crash MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201204/121 X-Sequence-Number: 32872 Follow-up: Putting in debug stubs for the plperl.c source from PostgreSQL 9.1.3 I've determined the crash mentioned in the first post of this thread occurs at line 905: if (SvTRUE(ERRSV)) Googling I found this: http://www.perlmonks.org/?node_id=870835 Where the last post in the thread talks about mismatches between MSVCR80.dll and MSVCRT.DLL causing the same crash in Perl 5.10. I think we have the same issue here between ActiveState Perl using MSVCRT.DLL and PLPERL.DLL compiled with the MS compilers using MSVCR90.DLL. So another solution which I've tested (and it works for me) is to compile Perl 5.14.2 from source using the Windows Platform SDK 7.0 (same one I used to compile PostgreSQL 9.1.3 in my previous post). To do that I changed the CCTYPE = MSVC90 in \win32\Makefile. This forces Perl to use the same MSVCR90.DLL that PLPERL.DLL (and PostgreSQL itself) uses. What I still don't understand is why ActiveState 5.14.1 and 5.14.2 work for some people with the official Postgresql 9.1.x binaries and not others. Since I distribute my own compiled version of Perl anyway, for PostgreSQL 9.1.x I will simply compile Perl with the Windows Platform SDK 7.0 instead of mingw32. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-6204-Using-plperl-functions-generate-crash-tp4802111p5654505.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.