"Alex J. Avriette" <[EMAIL PROTECTED]> writes:
Thanks Alex and Rocco for trying this; it is interesting that the
problem does not reproduce at your end. It prompted me to try it with
a stock RedHat Perl 5.8.0 that I had available, and it did NOT have the
segfault.
> > #! /umsapp/ext/bin/perl
>
> This is a strange place to put perl, is there perhaps something
> odd about this particular perl of yours?
Nothing particularly odd. We have our application sitting in /umsapp,
and custom-build Perl (and some other 3rd-party stuff) there as well so
we do not have to worry about what versions the OS vendor chooses to put
into the system.
I can reproduce this with a Perl 5.8.3 build as
sh Configure -Uinstallusrbinperl -Dprefix=/tmp/kn/a -Dcc='gcc' -Doptimize='-g'
-des -Dlocincpth="/tmp/kn/a/include /usr/local/include" -Dloclibpth="/tmp/kn/a/lib
/usr/local/lib"
make
make install
Yes, I tend to build Perl a lot, often in odd places :-).
> > #0 0x080c51ff in Perl_leave_scope ()
> Try 'list' as well from the (gdb) prompt.
I tried again, with a debug build of Perl:
(gdb) bt
#0 0x080ff09a in Perl_leave_scope (base=0) at scope.c:902
#1 0x080fc70d in Perl_pop_scope () at scope.c:137
#2 0x08067887 in S_my_exit_jump () at perl.c:4459
#3 0x0806759b in Perl_my_failure_exit () at perl.c:4439
#4 0x08104bd2 in Perl_die_where (message=0x848d8d0 "Died at
/home/users/kn/devel/trunk/ums0/src/usm/perl-crash.pl line 8.\n", msglen=70) at
pp_ctl.c:1389
#5 0x080b78fb in Perl_vdie (pat=0x8166e57 "%_", args=0xbffff6e0) at util.c:1096
#6 0x080b79d4 in Perl_die (pat=0x8166e57 "%_") at util.c:1126
#7 0x0810e85e in Perl_pp_die () at pp_sys.c:510
#8 0x080b4e3f in Perl_runops_debug () at dump.c:1438
#9 0x080628b1 in S_run_body (oldscope=1) at perl.c:1857
#10 0x0806241e in perl_run (my_perl=0x817af08) at perl.c:1776
#11 0x0805e542 in main (argc=2, argv=0xbffff8d4, env=0xbffff8e0) at perlmain.c:86
#12 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) list 890,905
890 case SAVEt_CLEARSV:
891 ptr = (void*)&PL_curpad[SSPOPLONG];
892 sv = *(SV**)ptr;
893
894 DEBUG_Xv(PerlIO_printf(Perl_debug_log,
895 "Pad 0x%"UVxf"[0x%"UVxf"] clearsv: %ld sv=0x%"UVxf"<%"IVdf">
%s\n",
896 PTR2UV(PL_comppad), PTR2UV(PL_curpad),
897 (long)((SV **)ptr-PL_curpad), PTR2UV(sv), (IV)SvREFCNT(sv),
898 (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) ? "clear" : "abandon"
899 ));
900
901 /* Can clear pad variable in place? */
902 if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) {
903 /*
904 * if a my variable that was made readonly is going out of
905 * scope, we want to remove the readonlyness so that it can
(gdb) p sv
$6 = (SV *) 0x1
(gdb) p ptr
$7 = (void *) 0x8214b30
(gdb) x/8x 0x8214b20
0x8214b20: 0x08214b14 0x00000000 0x000000ff 0x00000000
0x8214b30: 0x00000001 0x00000300 0x08189370 0x00000001
Something is clearly wrong here, since it is using the value '1' as an
SV*. I'll probably dig some more, try to figure out where that '1' came
from and perhaps reproduce without POE in order to get something that
can be presented to perl-porters.
And if anyone here can reproduce the problem I would love to know about it.
- Kristian
--
Kristian Nielsen [EMAIL PROTECTED]
Development Manager, Sifira A/S