-
Notifications
You must be signed in to change notification settings - Fork 577
Segfault due to stack overflow 'use lib sub{eval"use WHATEVER"};use WHATEVER' #15367
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
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' -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 a segfault in the perl interpreter. The testcase is the file below. On normal builds and debug builds, this segfaults. dcollins@nightshade64:~/perl$ ./perl -Ilib -We 'use lib sub{eval"use WHATEVER"};use WHATEVER' This appears to be a stack overflow bug caused by infinite recursion. Here is the iterating series of stack frames: #391 0x0000000000449949 in Perl_call_sv (sv=0x1d23290, flags=13) at perl.c:2841 Valgrind confirms: ==39283== Stack overflow in thread #1: can't grow stack to 0xffe801000 Bisect has been decidedly unhelpful, this bug has persisted since at least 5.12.0 **PERL -V** dcollins@nightshade64:~/perldebug$ ./perl -Ilib -V Characteristics of this binary (from libperl): |
From [email protected]Dan Collins wrote:
Not a bug. You asked for infinite recursion, and you got it. Code refs -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @demerphqOn 27 May 2016 03:44, "Zefram" <zefram@fysh.org> wrote:
Seems to me that if it segfaults its a bug. Even if this code should I vote we leave this open as a low priority ticket in case someone decides Yves |
From [email protected]demerphq wrote:
The SEGV for running out of stack space is a pretty clean result. -zefram |
From @demerphqOn 27 May 2016 at 15:10, Zefram <zefram@fysh.org> wrote:
I think its a bug that we don't see recursion warnings, and that we We used to have this problem in the regex engine, and we always It seems to me that this case is much the same. Yves -- |
From [email protected]demerphq wrote:
It did give a recursion warning.
Your problem there was for deep finite recursion, busting the stack in -zefram |
Migrated from rt.perl.org#128256 (status was 'open')
Searchable as RT128256$
The text was updated successfully, but these errors were encountered: