Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.91k stars 542 forks source link

core dump, use encoding 'utf8' and example re #8115

Closed p5pRT closed 13 years ago

p5pRT commented 19 years ago

Migrated from rt.perl.org#37183 (status was 'resolved')

Searchable as RT37183$

p5pRT commented 19 years ago

From James.H.McKim@grc.nasa.gov

Created by mckim@bandersnatch.grc.nasa.gov

This script (three lines\, below) caused perl to fault\, apparently during a memory allocation operation.

The first character in the re is U+00a8.

#!/usr/local/bin/perl -w use encoding 'utf8'; my $x = /¨\.\//;

As perl aborts\, I usually see the message​: "*** glibc detected *** corrupted double-linked list​: 0x08134618 ***"

gdb on the core dump reports​:

#0 0xffffe410 in ?? () #1 0xbfffeafc in ?? () #2 0x00000006 in ?? () #3 0x00002a2b in ?? () #4 0xb7e576e5 in raise () from /lib/tls/libc.so.6 #5 0xb7e59049 in abort () from /lib/tls/libc.so.6 #6 0xb7e8b7ba in __fsetlocking () from /lib/tls/libc.so.6 #7 0xb7e91717 in malloc_usable_size () from /lib/tls/libc.so.6 #8 0xb7e9268e in free () from /lib/tls/libc.so.6 #9 0xb7e94411 in malloc () from /lib/tls/libc.so.6 #10 0x0809ee55 in Perl_safesysmalloc () #11 0x08104d84 in PerlIOBuf_get_base () #12 0x08104b0d in PerlIOBuf_write () #13 0x080a00b0 in Perl_write_to_stderr () #14 0x080a0b1c in Perl_vwarn () #15 0x080a0d7e in Perl_vwarner () #16 0x080a0e0d in Perl_warner () #17 0x080b5537 in Perl_report_uninit () #18 0x080bddd1 in Perl_sv_2pv_flags () #19 0x080b0160 in Perl_pp_match () #20 0x080ad2ed in Perl_runops_standard () #21 0x080625d5 in perl_run () #22 0x0805e602 in main ()

Perl Info ``` Flags: category=core severity=medium Site configuration information for perl v5.8.7: Configured by mckim at Wed Aug 31 15:22:51 EDT 2005. Summary of my perl5 (revision 5 version 8 subversion 7) configuration: Platform: osname=linux, osvers=2.6.11-6mdk, archname=i686-linux uname='linux bandersnatch.grc.nasa.gov 2.6.11-6mdk #1 tue mar 22 16:04:32 cet 2005 i686 intel(r) pentium(r) 4 cpu 3.60ghz unknown gnulinux ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2', cppflags='-fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.4.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: @INC for perl v5.8.7: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl . Environment for perl v5.8.7: HOME=/home/mckim LANG=en_US LANGUAGE=en_US:en LC_ADDRESS=en_US LC_COLLATE=en_US LC_CTYPE=en_US LC_IDENTIFICATION=en_US LC_MEASUREMENT=en_US LC_MESSAGES=en_US LC_MONETARY=en_US LC_NAME=en_US LC_NUMERIC=en_US LC_PAPER=en_US LC_SOURCED=1 LC_TELEPHONE=en_US LC_TIME=en_US LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/mckim/bin:/usr/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/jdk-1.4.2_07/bin:/opt/jdk1.5.0_01/bin:/opt/netbeans-4.0/bin/:/usr/local/kde/bin:/usr/lib/ssh:/usr/lib/jdk-1.4.2_07/bin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 18 years ago

From @smpeters

[James.H.McKim@​grc.nasa.gov - Fri Sep 16 08​:29​:14 2005]​:

This is a bug report for perl from mckim@​bandersnatch.grc.nasa.gov\, generated with the help of perlbug 1.35 running under perl v5.8.7.

----------------------------------------------------------------- [Please enter your report here]

This script (three lines\, below) caused perl to fault\, apparently during a memory allocation operation.

The first character in the re is U+00a8.

#!/usr/local/bin/perl -w use encoding 'utf8'; my $x = /¨\.\//;

As perl aborts\, I usually see the message​: "*** glibc detected *** corrupted double-linked list​: 0x08134618 ***"

gdb on the core dump reports​:

#0 0xffffe410 in ?? () #1 0xbfffeafc in ?? () #2 0x00000006 in ?? () #3 0x00002a2b in ?? () #4 0xb7e576e5 in raise () from /lib/tls/libc.so.6 #5 0xb7e59049 in abort () from /lib/tls/libc.so.6 #6 0xb7e8b7ba in __fsetlocking () from /lib/tls/libc.so.6 #7 0xb7e91717 in malloc_usable_size () from /lib/tls/libc.so.6 #8 0xb7e9268e in free () from /lib/tls/libc.so.6 #9 0xb7e94411 in malloc () from /lib/tls/libc.so.6 #10 0x0809ee55 in Perl_safesysmalloc () #11 0x08104d84 in PerlIOBuf_get_base () #12 0x08104b0d in PerlIOBuf_write () #13 0x080a00b0 in Perl_write_to_stderr () #14 0x080a0b1c in Perl_vwarn () #15 0x080a0d7e in Perl_vwarner () #16 0x080a0e0d in Perl_warner () #17 0x080b5537 in Perl_report_uninit () #18 0x080bddd1 in Perl_sv_2pv_flags () #19 0x080b0160 in Perl_pp_match () #20 0x080ad2ed in Perl_runops_standard () #21 0x080625d5 in perl_run () #22 0x0805e602 in main ()

I don't know how much help this is\, but I remember seeing a coredump through this bit of code elsewhere.

#16 0x080a0e0d in Perl_warner () #17 0x080b5537 in Perl_report_uninit () #18 0x080bddd1 in Perl_sv_2pv_flags ()

p5pRT commented 18 years ago

The RT System itself - Status changed from 'new' to 'open'

p5pRT commented 18 years ago

From @smpeters

I don't know how much help this is\, but I remember seeing a coredump through this bit of code elsewhere.

#16 0x080a0e0d in Perl_warner () #17 0x080b5537 in Perl_report_uninit () #18 0x080bddd1 in Perl_sv_2pv_flags ()

RT #3646 provides another example of this coredump.

p5pRT commented 18 years ago

From @smpeters

[stmpeters - Sun Sep 25 21​:28​:18 2005]​:

I don't know how much help this is\, but I remember seeing a coredump through this bit of code elsewhere.

#16 0x080a0e0d in Perl_warner () #17 0x080b5537 in Perl_report_uninit () #18 0x080bddd1 in Perl_sv_2pv_flags ()

RT #3646 provides another example of this coredump.

With a debugging Perl I get​:
#0 0xffffe410 in __kernel_vsyscall () (gdb) bt #0 0xffffe410 in __kernel_vsyscall () #1 0xb7d8b9b1 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0xb7d8d2c9 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7dbf6ea in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6 #4 0xb7dc56fd in malloc_usable_size () from /lib/tls/i686/cmov/libc.so.6 #5 0xb7dc65d3 in free () from /lib/tls/i686/cmov/libc.so.6 #6 0xb7dc8391 in malloc () from /lib/tls/i686/cmov/libc.so.6 #7 0x080bc1e5 in Perl_safesysmalloc (size=4096) at util.c​:78 #8 0x081518d9 in PerlIOBuf_get_base (f=0x8190b54) at perlio.c​:3880 #9 0x0814ebe3 in Perl_PerlIO_get_base (f=0x8190b54) at perlio.c​:1776 #10 0x08151423 in PerlIOBuf_write (f=0x8190b54\, vbuf=0x8195e70\, count=73)   at perlio.c​:3743 #11 0x0814e534 in Perl_PerlIO_write (f=0x8190b54\, vbuf=0x8195e70\, count=73)   at perlio.c​:1593 #12 0x080be377 in Perl_write_to_stderr (   message=0x8195e70 "Use of uninitialized value in pattern match (m//) at rt_37183.pl line 3.\n"\, msglen=73) at util.c​:1060 #13 0x080bf049 in Perl_vwarn (pat=0x8172ce0 "Use of uninitialized value%s%s"\,   args=0xbfc214f4) at util.c​:1302 #14 0x080bf33b in Perl_vwarner (err=41\,   pat=0x8172ce0 "Use of uninitialized value%s%s"\, args=0xbfc214f4) at util.c​:1381 #15 0x080bf08f in Perl_warner (err=41\, pat=0x8172ce0 "Use of uninitialized value%s%s")   at util.c​:1352 #16 0x080dc826 in Perl_report_uninit () at sv.c​:658 #17 0x080e1cf3 in Perl_sv_2pv_flags (sv=0x818312c\, lp=0xbfc21658\, flags=34)   at sv.c​:3306 #18 0x080d4805 in Perl_pp_match () at pp_hot.c​:1259 #19 0x080bbd11 in Perl_runops_debug () at dump.c​:1459 #20 0x08062af6 in S_run_body (oldscope=1) at perl.c​:2310 #21 0x08062692 in perl_run (my_perl=0x8183008) at perl.c​:2229 #22 0x0805e8b5 in main (argc=3\, argv=0xbfc218c4\, env=0xbfc218d4) at perlmain.c​:99

p5pRT commented 14 years ago

From @khwilliamson

I'm not sure what to do about this ticket. I don't know the protocol to follow. I can't reproduce it on 5.8.9\, 5.10.1 nor blead. It was found in 5.8.7. If I could reproduce it on an earlier version\, I would feel confident in closing it; but since I can't\, it could be something in the environment.

--Karl Williamson

p5pRT commented 14 years ago

From @iabyn

On Wed\, Apr 21\, 2010 at 07​:29​:31PM -0700\, Karl Williamson via RT wrote​:

I'm not sure what to do about this ticket. I don't know the protocol to follow. I can't reproduce it on 5.8.9\, 5.10.1 nor blead. It was found in 5.8.7. If I could reproduce it on an earlier version\, I would feel confident in closing it; but since I can't\, it could be something in the environment.

I would normally try and 'git bisect' it to see if there was an obvious commit that fixed it.

-- "Foul and greedy Dwarf - you have eaten the last candle."   -- "Hordes of the Things"\, BBC Radio.

p5pRT commented 13 years ago

From @iabyn

I bisected it​:

fixed in 5.10.0 by 9e08bc66da56140ed8efaea283d1b4b6053eef0b\, and in 5.8.9 by f450cdef4144e9fb138a74cfe3b6bb2258dd5334

p5pRT commented 13 years ago

@iabyn - Status changed from 'open' to 'resolved'