develooper Front page | perl.perl5.porters | Postings from January 2014

[perl #120998] p /x in debugger yields memory fault

Thread Next
Tony Cook via RT
January 23, 2014 02:48
[perl #120998] p /x in debugger yields memory fault
Message ID:
On Mon Jan 13 21:55:44 2014, wrote:
> On 01/13/2014 10:48 PM, Karl Williamson wrote:
> > On 01/13/2014 10:21 PM, Father Chrysostomos wrote:
> >> Karl Williamson wrote:
> >>> Typing
> >>>     p /x
> >>> in the Perl debugger causes an immediate memory fault.
> >>
> >> I get "Search pattern not terminated."
> >>
> >> Is this a regression?
> >>
> >
> > It turns out it is.  Fails in blead; works in 5.18.0
> >
> I ran this:
> valgrind ./perl -Ilib -d utils/perlbug

I've reproduced this in a 32-bit VM, here's a more detailed stack trace (I used "o signalLevel=0" to avoid the debugger setting a signal handler, since we're getting twice the noise with it):

(gdb) bt
#0  0xb76a27a4 in __memmove_ssse3_rep () from /lib/
#1  0x081f756b in Perl_sv_setpvn (my_perl=0x8d29008, sv=0x8f29fb4, 
    ptr=0x8f3e68c "", len=4294967294) at sv.c:4698
#2  0x08211561 in Perl_newSVpvn_flags (my_perl=0x8d29008, s=0x8f3e68c "", 
    len=4294967294, flags=524288) at sv.c:8755
#3  0x0827144f in Perl_pp_caller (my_perl=0x8d29008) at pp_ctl.c:1846
#4  0x08174ba5 in Perl_runops_debug (my_perl=0x8d29008) at dump.c:2397
#5  0x0827b776 in S_docatch (my_perl=0x8d29008, o=0x9166428) at pp_ctl.c:3215
#6  0x08286cd0 in Perl_pp_entertry (my_perl=0x8d29008) at pp_ctl.c:4387
#7  0x08174ba5 in Perl_runops_debug (my_perl=0x8d29008) at dump.c:2397
#8  0x0809963f in Perl_call_sv (my_perl=0x8d29008, sv=0x9142dd4, flags=6)
    at perl.c:2746
#9  0x08179c76 in S_invoke_exception_hook (my_perl=0x8d29008, ex=0x8f3efcc, 
    warn=false) at util.c:1517
#10 0x0817a181 in Perl_vcroak (my_perl=0x8d29008, 
    pat=0x83799c3 "Search pattern not terminated", args=0xbfd8e52c)
    at util.c:1638
#11 0x0817a1ed in Perl_croak (my_perl=0x8d29008, 
    pat=0x83799c3 "Search pattern not terminated") at util.c:1684
#12 0x080f5cce in S_scan_pat (my_perl=0x8d29008, start=0x8f3e6fe "/x;\n\n;", 
    type=31) at toke.c:9716
#13 0x080e1750 in Perl_yylex (my_perl=0x8d29008) at toke.c:6795
#14 0x08102e1e in Perl_yyparse (my_perl=0x8d29008, gramtype=258) at perly.c:342
#15 0x0827d1e9 in S_doeval (my_perl=0x8d29008, gimme=3, outside=0x8d2bcdc, 
    seq=2584, hh=0x8ee42f8) at pp_ctl.c:3475
#16 0x08284c39 in Perl_pp_entereval (my_perl=0x8d29008) at pp_ctl.c:4261
#17 0x08174ba5 in Perl_runops_debug (my_perl=0x8d29008) at dump.c:2397
#18 0x0809839b in S_run_body (my_perl=0x8d29008, oldscope=1) at perl.c:2441
#19 0x080979bc in perl_run (my_perl=0x8d29008) at perl.c:2362
#20 0x0805df30 in main (argc=3, argv=0xbfd8f3f4, env=0xbfd8f404)
    at perlmain.c:112

Note the large len value passed to Perl_newSVpvn_flags.

I'll fiddle with this some more.


via perlbug:  queue: perl5 status: open

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About