-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storable null pointer deref on truncated data #9822
Comments
From @dglCreated by @dglWhen deserialising truncated storable data where the truncation is within a Program received signal SIGSEGV, Segmentation fault. text is 0x0. Code to reproduce is below, rather oddly if you uncomment the use v5.10 line it # Uncommenting the line below appears to stop the segfault $Storable::Eval = 1; my $s = { thaw(substr(freeze($s), 0, 4096)); It seems to vary slightly on different machines but this segfaults after Perl Info
|
From [email protected]
Thanks for this report. I can reproduce it down to perl 5.8.1, either with threads enabled or $ valgrind perl5.10.0-dbg x.pl Indeed, if you "use 5.010", the error disappears - but not if you "use BEGIN { $^H{foo} = 1 } also doesn't segfault and is valgrind-clean. Vincent. |
The RT System itself - Status changed from 'new' to 'open' |
From [email protected]
More precisely, setting the hint must happen before initializing $s, as BEGIN { $^H{foo} = 1 } while this does : my $s = { Vincent. |
From [email protected]On Sun, 09 Aug 2009 06:56:32 -0700, dgl wrote:
The patch attached to https://rt-archive.perl.org/perl5/Ticket/Display.html?id=130098 fixes this segfault. |
From @jkeenanOn Mon, 21 Nov 2016 18:27:26 GMT, lightsey@cpan.org wrote:
Please review the smoke-me/jkeenan/130098-storable branch. Can we add a regression test to t/store.t in that branch that specifically addresses the problem reported in this ticket? Thank you very much. -- |
From @jkeenanOn Mon, 21 Nov 2016 18:27:26 GMT, lightsey@cpan.org wrote:
Can you confirm that commit adf9095 to blead remedies this situation? Thank you very much. -- |
From @jkeenanOn Sun, 01 Jan 2017 15:19:12 GMT, jkeenan wrote:
I don't think that commit fixes the problem. When I build a threaded perl at blead (see attachment) and then run the program in the original post in this ticket, I get output like this: ##### Any ideas? Thank you very much. |
From @jkeenanSummary of my perl5 (revision 5 version 25 subversion 9) configuration: Characteristics of this binary (from libperl): |
From @lightseyOn Fri, 2017-01-06 at 18:13 -0800, James E Keenan via RT wrote:
Your results show the problem is fixed. Storable is dieing instead of The data is corrupted by the substr() on the 8th iteration, so it can't be |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#68348 (status was 'resolved')
Searchable as RT68348$
The text was updated successfully, but these errors were encountered: