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

Re: [perl #21914] 3-arg open + local $fh + strict coredump

Thread Previous | Thread Next
Jarkko Hietaniemi
April 10, 2003 00:36
Re: [perl #21914] 3-arg open + local $fh + strict coredump
Message ID:
> The SEGV happens in Perl_newASSIGNOP op.c:3089 because SvCUR() tries
> to dereference a NULL 'gv' pointer.
> That 'gv' is NULL because change #17942 removed PL_nullstash,
> from which the return value of gv_fetchpv had to be fetched when
> 	see gv.c:722,734,759 and the gv.c hunk in change #17942
> 	(it should be now line 764)
> I don't think that gv_fetchpv returning NULL when its 'add' argument 
> is non-zero is exactly right - and I failed to see what was so
> wrong with PL_nullstash.
> Below I simply test for a non-null 'gv' - but, again, what
> harm was PL_nullstash doing ?

I may be compleletly wrong on this but maybe the PL_nullstash
was handling the "homeless" variables created by the "package;"
feature which is what the #17942 was removing.

But your patch looks good enough for now.

Jarkko Hietaniemi <> "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About