Re: BUG #6204: Using plperl functions generate crash - Mailing list pgsql-bugs

From ljwilson
Subject Re: BUG #6204: Using plperl functions generate crash
Date
Msg-id 1334935387285-5654505.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #6204: Using plperl functions generate crash  (Simon Willett <simonw@gbitsystems.co.uk>)
List pgsql-bugs
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-tp4802111p5654505.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: BUG #6602: concurrent psql session clobbers history
Next
From: eshkinkot@gmail.com
Date:
Subject: BUG #6605: wrong type cast from timestamp to timestamptz