On Wed, Nov 19, 2003 at 12:14:21AM +0000, Alan Burlison wrote: > > 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? That code is only supposed to be executed on restricted hashes, ie where SvREADONLY is set. Presuably the assumption is that restricted hashes always have xhv_array set. I don't know whether that assumption is valid. Dave. -- SCO - a train crash in slow motionThread Previous | Thread Next