Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Assert fail in S_sublex_done without other symptoms #15366
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 -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 an assert fail in debug buids of the perl interpreter. The testcase is the file below. On normal builds, this runs normally (albeit with an expected warning). On debug builds, this returns an assert fail.
dcollins@nightshade64:~/perl$ ./perl -Ilib /usr/local/perl-afl/out/allcrash/f1i000029
dcollins@nightshade64:~/perl$ cd ../perldebug/
dcollins@nightshade64:~/perldebug$ cat /usr/local/perl-afl/out/allcrash/f1i000029
Debugging tool output is below. A git bisect was performed and reported the following.
toke.c: Remove redundant check
(and turn it into an assertion.)
PL_lex_repl can only be set here if we are parsing a substitution
:100644 100644 ca306f1455ba8f2c02acd3d7eff3e5490706de84 8ac0f31fb4f85c4ab453b52ec75f92900c448292 M toke.c
dcollins@nightshade64:~/perldebug$ gdb --args ./miniperl -Ilib /usr/local/perl-afl/out/allcrash/f1i000029
Program received signal SIGABRT, Aborted.
No reported memory management errors.
dcollins@nightshade64:~/perldebug$ ./perl -Ilib -V
Characteristics of this binary (from libperl):
On Thu, May 26, 2016 at 05:45:05PM -0700, Dan Collins wrote:
Fixed by the below:
RT #128255: Assert fail in S_sublex_done
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.