Segfault in Perl_grok_number_flags under use feature 'bitwise' #15346
I have compiled bleadperl with the afl-gcc compiler using:
./Configure -Dusedevel -Dprefix='/usr/local/perl-afl' -Dcc='ccache afl-gcc' -Uuselongdouble -Duse64bitall -Doptimize=-g -Uversiononly -Uman1dir -Uman3dir -Dusequadmath -DDEBUGGING -des
And then fuzzed the resulting binary using:
AFL_NO_VAR_CHECK=1 afl-fuzz -i in -o out bin/perl -t -W @@
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 below. On debug builds, this returns an assert fail.
dcollins@nightshade64:~$ od -c f3i000134
Debugging tool output is below. A git bisect was attempted, but this persists as far back as 5.22, which is when the bitwise feature was first introduced.
Program received signal SIGSEGV, Segmentation fault.
Program received signal SIGABRT, Aborted.
dcollins@nightshade64:~/perl$ valgrind ./perl -Ilib ../f3i000134
dcollins@nightshade64:~/perl$ ./perl -Ilib -V
Characteristics of this binary (from libperl):
On Fri May 20 19:41:40 2016, firstname.lastname@example.org wrote:
Thank you for the report. This is fixed in 76734a3.
Thank you for filing this report. You have helped make Perl better.
With the release today of Perl 5.26.0, this and 210 other issues have been
Perl 5.26.0 may be downloaded via:
If you find that the problem persists, feel free to reopen this ticket.