Fwd: [PATCH] Re: [perl #74170] Data::Dumper -- dumping large hash returns empty string, segfaults perl
[email protected] (Father Chrysostomos)
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
I forgot to CC this to the list. Begin forwarded message: > From: Father Chrysostomos > Date: June 6, 2010 12:59:22 PM PDT > To: Tony Cook > Subject: Re: [PATCH] Re: [perl #74170] Data::Dumper -- dumping large > hash returns empty string, segfaults perl > > > On May 31, 2010, at 6:19 AM, Tony Cook wrote: > >> On Sun, May 23, 2010 at 01:55:08PM -0700, Father Chrysostomos wrote: >>> newapad = apad; >>> >>> + diff = SP - PL_stack_sp; >>> DD_dump(aTHX_ val, SvPVX_const(name), SvCUR(name), valstr, >>> seenhv, >>> postav, &level, indent, pad, xpad, newapad, sep, pair, >>> freezer, toaster, purity, deepcopy, quotekeys, >>> bless, maxdepth, sortkeys); >>> + /* DD_dump might have called a custom sort routine that >>> + might have reallocated the stack (see >>> + [perl #74170]). */ >>> + SPAGAIN; >>> + SP += diff; >>> >> >> Couldn't that just be: >> >> PUTBACK; >> ... >> SPAGAIN; >> >> ? > > I have no idea. :-) > > I believe that will cause PL_stack_sp to have a different value when > the custom sort sub is called, but I don’t know enough about perl’s > stack to say whether that will make any difference. > > Father Chrysostomos >