-
Notifications
You must be signed in to change notification settings - Fork 559
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
Segfault in Perl_vwarner (util.c:2051) #15824
Comments
From @dur-randirCreated by @dur-randirWhile fuzzing perl v5.25.8-216-gfbceb79751 built with afl and run eval q!$^D = 'C';0 =~ ~v1000 / 0! to crash on debugging builds (as assigning to $^D is a no-op on 4df352a is the first bad commit reverse the order of POPBLOCK; POPFOO Currently most pp_leavefoo subs have something along the lines of POPBLOCK(cx); where POPBLOCK does cxstack_ix-- and sets cx to point to the top CX stack Then POPFOO does any type-specific restoration, e.g. POPSUB decrements the However, this is logically the wrong order. When we *enter* a scope, we do PUSHBLOCK; so undoing the PUSHBLOCK should be the last thing we do. As it happens, Reordering it has two advantages. First, it allows the steps for scope exit to be the exact logical reverse It allows us to make the code cleaner. This commit also removes the cxstack_ix-- and setting cx steps from So in full, POPBLOCK(cx); is now implemented as: cx = &cxstack[cxstack_ix]; Finally, this commit also tweaks PL_curcop in pp_leaveeval, since GDB info about the crash location: #0 0x00007fbd1b8dc188 in Perl_vwarner (err=2, pat=0x7fbd1bb87876 Perl Info
|
From @iabynOn Sun, Jan 22, 2017 at 01:10:42PM -0800, Sergey Aleynikov wrote:
I've fixed the proximate cause with the following two commits; the deeper commit b1a69a6 ckDEAD: PL_curcop->cop_warnings only if PL_curcop commit f4c6177 mess_sv(): access only if PL_curcop is non-null -- |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#130621 (status was 'open')
Searchable as RT130621$
The text was updated successfully, but these errors were encountered: