develooper Front page | perl.perl5.porters | Postings from December 2016

[perl #130098] Multiple segfaults in Storable.

From:
James E Keenan via RT
Date:
December 25, 2016 02:46
Subject:
[perl #130098] Multiple segfaults in Storable.
Message ID:
rt-4.0.24-6856-1482633998-981.130098-15-0@perl.org
On Fri, 02 Dec 2016 02:32:34 GMT, john@nixnuts.net wrote:
> On Wed, 2016-11-30 at 19:19 -0800, James E Keenan via RT wrote:
> > On Thu, 01 Dec 2016 02:36:15 GMT, john@nixnuts.net wrote:
> > > Updated patch to correct several null pointer deference bugs in
> > > Storable is
> > > attached.
> >
> > Can you provide a bit more specific evidence of the problem?
> >
> > Are there any tests we could write for this that would expose
> > regressions?
> >
> > Thank you very much.
> >
> 
> I've bundled up three of the crashing Storable files into the attached
> test
> script. These segfault reliably on my x86_64 system in three of the
> patched
> locations.
> 
> 
> $ gdb -ex run -ex bt -batch -args perl ./null_crashes.pl
> old_retrieve_array
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-
> gnu/libthread_db.so.1".
> Loading old_retrieve_array...
> 
> Program received signal SIGSEGV, Segmentation fault.
> retrieve_other (cxt=cxt@entry=0x0, cname=0x0) at Storable.xs:3984
> 3984                    cxt->ver_major != STORABLE_BIN_MAJOR &&
> #0  retrieve_other (cxt=cxt@entry=0x0, cname=0x0) at Storable.xs:3984
> #1  0x00007ffff6872967 in old_retrieve_array (cxt=0x555556355020,
> cname=<optimized out>) at Storable.xs:5783
> ...

John,

In the smoke-me/jkeenan/130098-storable branch I applied your patch for Storable.xs.  Storable::$VERSION had already been incremented, so I manually re-incremented.  I worked your test program into 3 regression tests in t/store.t -- though you might want to suggest better descriptions than mine.

P5P:  Could this be reviewed by someone more familiar with Storable than I?  (Otherwise, I will push to blead within 7 days.)

Thank you very much.
-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=130098



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