On Wed, Nov 17, 2004 at 02:49:15PM +1100, John Hansen wrote:
> The following function:
[snip]
> creashes the backend, UNLESS it's executed in the same session where it was created.
I can reproduce this crash on the following platform:
Solaris 9
PostgreSQL 8.0.0beta4 (CVS)
Perl 5.8.5
gcc 3.4.2
I can NOT reproduce the crash on the following platform:
FreeBSD 4.10-STABLE
PostgreSQL 8.0.0beta4 (CVS - same copy of source as above)
Perl 5.8.6-RC1
gcc 2.95.4
The server log on the Solaris box shows this when it crashes
(signal 10 is SIGBUS):
Can't return outside a subroutine at (eval 4) line 13.
LOG: server process (PID 25681) was terminated by signal 10
Adding a few elog lines to the function shows that it's crashing
at the "return $res;" line. One of my gdb sessions showed the
following, although haven't been able to get this same output again:
Program received signal SIGSEGV, Segmentation fault.
0xfec8c1e4 in Perl_av_fetch () from /usr/local/lib/libperl.so
(gdb) bt
#0 0xfec8c1e4 in Perl_av_fetch () from /usr/local/lib/libperl.so
#1 0xfec689f4 in S_pad_findlex () from /usr/local/lib/libperl.so
#2 0xfec68968 in Perl_pad_findmy () from /usr/local/lib/libperl.so
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/