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
'x' operator on list causes segfault and confuses valgrind, 64-bit version #14972
Comments
From @dcollinsnGreetings Porters, I have compiled bleadperl with the afl-gcc compiler using: ./Configure -Dusedevel -Dprefix='/usr/local/perl-afl' -Dcc='ccache afl-gcc' -Duselongdouble -Duse64bitall -Doptimize=-g -Uversiononly -Uman1dir -Uman3dir -des And then fuzzed the resulting binary using: AFL_NO_VAR_CHECK=1 afl-fuzz -i in -o out bin/perl @@ After reducing testcases using `afl-tmin` and performing additional minimization by hand, I have located the following testcase that triggers a segmentation fault in the perl interpreter. The testcase is the file: @0[(0)x~0] As you might expect, ~0 is functioning as a really big number here, and this also segfaults: @0[(0)x18446744073709551615] However, this does not: @0[(0)x8446744073709551615] => Out of memory during array extend at -e line 1. And this gets awkward: @0[(0)x1446744073709551615] => panic: realloc, size=11573952589676414152 at -e line 1. This appears to be related to [perl #125937], although this persists after that bug was fixed (and this bug is the bigger badder 64-bit brother of that one) **GDB** (gdb) run Program received signal SIGSEGV, Segmentation fault. **VALGRIND** Valgrind had a bad time with this one: ==50624== Memcheck, a memory error detector valgrind: m_mallocfree.c:303 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed. host stacktrace: sched status: Thread 1: status = VgTs_Runnable (lwpid 50624) Note: see also the FAQ in the source distribution. If that doesn't help, please report this bug to: www.valgrind.org In the bug report, send all the above text, the valgrind **PERL -V** Summary of my perl5 (revision 5 version 23 subversion 4) configuration: Characteristics of this binary (from libperl): |
From @dcollinsnThis now crashes with the following message, without a segfault, on both debugging and nondebugging perls on the same platform: panic: av_extend_guts() negative count (-9223372036854775681) dcollins@nightshade64:/usr/local/perl-afl/out$ ../bin/perl -V Characteristics of this binary (from libperl): |
From @iabynOn Mon, Oct 19, 2015 at 01:32:24PM -0700, Dan Collins via RT wrote:
Technically that's correct, in that its catching the error and throwing I've just pushed out a branch for smoking, smoke-me/davem/repeat that Out of memory during stack extend and also fixes a spurious g++ compiler warning from my earlier messing -- |
The RT System itself - Status changed from 'new' to 'open' |
From @iabynOn Tue, Oct 20, 2015 at 04:46:50PM +0100, Dave Mitchell wrote:
and now merged as: -- |
@iabyn - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for submitting this report. You have helped make Perl better. Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0 |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#126309 (status was 'resolved')
Searchable as RT126309$
The text was updated successfully, but these errors were encountered: