develooper Front page | perl.perl5.porters | Postings from November 2003

Re: 5.8.2 coredump: tied hashes implemented as XSUB methods

Thread Previous | Thread Next
From:
Alan Burlison
Date:
November 18, 2003 16:15
Subject:
Re: 5.8.2 coredump: tied hashes implemented as XSUB methods
Message ID:
3FBAB5DD.2060802@sun.com
 > I'm getting the SEGV in Perl_hv_clear, here:
> 
>         I32 i;
>         HE* entry;
>         for (i = 0; i <= (I32) xhv->xhv_max; i++) {
> --->         entry = ((HE**)xhv->xhv_array)[i];
> 
> because xhv->xhv_array is NULL - I have no idea why yet.

This looks distinctly broken to me.  newHV returns a HV with xhv_array set 
to NULL, so I can't see how the line above which indexes xhv_array without 
checking it for NULL can ever be safe - or am I missing something?

-- 
Alan Burlison
--


Thread Previous | Thread Next


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