develooper Front page | perl.perl5.porters | Postings from June 2002

Re: [ID 20020626.003] 5.8.0-RC2 segfault (combination of DESTROY, goto, delete)

Thread Previous
From:
=?ISO-8859-1?Q?Kay_R=F6pke?=
Date:
June 26, 2002 09:17
Subject:
Re: [ID 20020626.003] 5.8.0-RC2 segfault (combination of DESTROY, goto, delete)
Message ID:
6EA94546-891F-11D6-B888-000393414688@dolphin-services.de

On Wednesday, June 26, 2002, at 03:08  PM, Elizabeth Mattijsen wrote:

> At 01:14 AM 6/26/02 +0200, Pixel wrote:
>> The following code segfaults:
>>
>> sub A::DESTROY {
>>     my $f = delete $A::list{$_[0]};
>>     goto $f;
>> }
>>
>> {
>>     my $w;
>>     my $b = bless {}, 'A';
>>     $A::list{$b} = sub { $w };
>>     0;
>> }
>
>
>
> Just my 2c worth...

Then we've got 4c by now...;-)


Here's a bt:

Thread 0 Crashed:
  #0   0x000000fc in 0xfc
  #1   0x00430844 in Perl_runops_debug
  #2   0x003c0a80 in S_call_body
  #3   0x003c05b8 in Perl_call_sv
  #4   0x0046c45c in Perl_sv_clear
  #5   0x0046cff4 in Perl_sv_free
  #6   0x004734fc in Perl_sv_unref_flags
  #7   0x00469e20 in Perl_sv_force_normal_flags
  #8   0x0049f4b0 in Perl_leave_scope
  #9   0x0049b674 in Perl_pop_scope
  #10  0x004aa86c in Perl_pp_leaveloop
  #11  0x00430844 in Perl_runops_debug
  #12  0x003bf7d8 in S_run_body
  #13  0x003bf19c in perl_run
  #14  0x00002678 in main
  #15  0x00002298 in _start
  #16  0x000020c8 in start


It appears that pp_ctl.c:2162 has:

(void)(*CvXSUB(cv))(aTHX_ cv);

which comes out to a call:
((XPVCV*)SvANY(sv))->xcv_xsub

xcv_xsub seems to be 0xFF for some reason. (at least on two subsequent 
tries...)


If anyone has more tuits....good luck.


regards,

kay


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About