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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs