pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ljwilson <ljwilson@digitalav.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #6204: Using plperl functions generate crash
Date: Fri, 20 Apr 2012 08:23:07 -0700 (PDT)
Message-ID: <1334935387285-5654505.post@n5.nabble.com> (raw)
In-Reply-To: <1334863867904-5652595.post@n5.nabble.com>
References: <loom.20111010T192453-600@post.gmane.org>
	<B28B3294-3D6F-4958-8D1E-B8E065CF1F65@enterprisedb.com>
	<4E933F4B.1080501@hogranch.com>
	<CAFqwwS5y2tLV1XdGXBpMQFfYEA9N1BrZyrbbuAZzG2S8HmjNeg@mail.gmail.com>
	<1324485031237-5092359.post@n5.nabble.com>
	<1324502463083-5092951.post@n5.nabble.com>
	<1334055689658-5629612.post@n5.nabble.com>
	<CA+Tgmobntf7sZR1jw4L5FGCK9bXvKEFkbNGxVwE927VxW9zdmg@mail.gmail.com>
	<1334842206353-5651759.post@n5.nabble.com>
	<1334863867904-5652595.post@n5.nabble.com>

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 <perl source directory>\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-tp4802111p565...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



view thread (15+ messages)

Message-ID: <1334935387285-5654505.post@n5.nabble.com>
Permalink:  ../1334935387285-5654505.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1334935387285-5654505.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: ljwilson@digitalav.com
  Subject: Re: BUG #6204: Using plperl functions generate crash
  In-Reply-To: <1334935387285-5654505.post@n5.nabble.com>
  References: <loom.20111010T192453-600@post.gmane.org> <B28B3294-3D6F-4958-8D1E-B8E065CF1F65@enterprisedb.com> <4E933F4B.1080501@hogranch.com> <CAFqwwS5y2tLV1XdGXBpMQFfYEA9N1BrZyrbbuAZzG2S8HmjNeg@mail.gmail.com> <1324485031237-5092359.post@n5.nabble.com> <1324502463083-5092951.post@n5.nabble.com> <1334055689658-5629612.post@n5.nabble.com> <CA+Tgmobntf7sZR1jw4L5FGCK9bXvKEFkbNGxVwE927VxW9zdmg@mail.gmail.com> <1334842206353-5651759.post@n5.nabble.com> <1334863867904-5652595.post@n5.nabble.com> <1334935387285-5654505.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox