Hi, I ran into a segmentation violation caused by a NULL-pointer reference in mg.c when I tried to display my procedures environment using the debuggers 'X' command. The stack trace showed: S_magic_methcall ---- SEGV within PUSHs(SvTIED_obj(sv, mg)); S_magic_methpack Perl_magic_existspack Perl_av_exists I had a closer look at the code and figured out, that this NULL- pointer was cased by a failed mg_find in av.c line 800. This function call return '0' and passed this unchecked to the mg- functions. I've fixed this as follows: diff -c av.c.FCS av.c *** av.c.FCS Mon Oct 30 14:13:05 2000 --- av.c Mon Oct 30 14:14:33 2000 *************** *** 795,804 **** } if (SvRMAGICAL(av)) { if (mg_find((SV*)av,'P') || mg_find((SV*)av,'D')) { SV *sv = sv_newmortal(); mg_copy((SV*)av, sv, 0, key); ! magic_existspack(sv, mg_find(sv, 'p')); ! return SvTRUE(sv); } } if (key <= AvFILLp(av) && AvARRAY(av)[key] != &PL_sv_undef --- 795,808 ---- } if (SvRMAGICAL(av)) { if (mg_find((SV*)av,'P') || mg_find((SV*)av,'D')) { + MAGIC *mg; SV *sv = sv_newmortal(); mg_copy((SV*)av, sv, 0, key); ! mg = mg_find(sv, 'p'); ! if( mg) { ! magic_existspack(sv,mg); ! return SvTRUE(sv); ! } } } if (key <= AvFILLp(av) && AvARRAY(av)[key] != &PL_sv_undef Hope this is sufficient ... Regards -- Jens -------------------------------------------------------------------------------- / +##+|##+ STRAWBERRY Jens Hamisch +v#+v v##+ EDV-Systeme GmbH Managing director / v v\v | . . . | Brauneckweg 2 Car (Voice): (+49 172) 81 04 162 | . | D-82549 Koenigsdorf Voice: (+49 8179) 9305-50 | . | Fax: (+49 8179) 9305-38 \ . / Tel./Fax: (+49 8179) 9305-50 Email: jens@Strawberry.COM \____/ Strawberry@Strawberry.COMThread Next