为什么 Perl 会崩溃并显示“*** glibc 检测到 *** perl: munmap_chunk(): 无效指针”?
#!/usr/bin/env perl
use warnings;
use strict;
use 5.012;
use XML::LibXML::Reader;
my $reader = XML::LibXML::Reader->new( location => 'http://www.heise.de/' ) or die $!;
while ( $reader->read ) {
say $reader->name;
}
在此脚本的输出结束时,我收到以下错误消息:
* 检测到 glibc * perl: munmap_chunk(): 无效指针: 0x0000000000b362e0 *** ======= 回溯: =========
/lib64/libc.so.6[0x7fb84952fc76]
...
======= 内存映射:========
00400000-0053d000 r-xp 00000000 08:01 182002 /usr/local/bin/perl
...
这是由于错误吗?
perl -V:
我的 perl5(修订版 5 版本 12 subversion 0)配置摘要:
平台:
osname=linux、osvers=2.6.31.12-0.2-desktop、archname=x86_64-linux uname='linux linux1 2.6.31.12-0.2-desktop #1 smp 抢占 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 gnulinux ' config_args='-Dnoextensions=ODBM_File' 提示=推荐,useposix=true,d_sigaction=定义 useithreads=undef, usemultiplicity=undef useperlio=定义、d_sfio=undef、uselargefiles=定义、usesocks=undef use64bitint=定义、use64bitall=定义、uselongdouble=undef usemymalloc=n, bincompat5005=undef
编译器:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', 优化='-O2', cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='',gccversion='4.4.1 [gcc-4_4-分支修订版 150839]',gccosandvers='' intsize = 4,longsize = 8,ptrsize = 8,doublesize = 8,字节顺序= 12345678 d_longlong=定义,longlongsize=8,d_longdbl=定义,longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 对齐字节=8,原型=定义
链接器和库:
ld='cc', ldflags ='-fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64 libs=-lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.10.1.so,so=so,useshrplib=false,libperl=libperl.a gnulibc_version='2.10.1' 动态链接: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
此二进制文件的特征(来自 libperl): 编译时选项:PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
Linux下构建 编译于 2010 年 4 月 15 日 13:25:46 @INC: /usr/local/lib/perl5/site_perl/5.12.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.12.0 /usr/local/lib/perl5/5.12.0/x86_64-linux /usr/local/lib/perl5/5.12.0 。
#!/usr/bin/env perl
use warnings;
use strict;
use 5.012;
use XML::LibXML::Reader;
my $reader = XML::LibXML::Reader->new( location => 'http://www.heise.de/' ) or die $!;
while ( $reader->read ) {
say $reader->name;
}
At the end of the output from this script I get this error-messages:
* glibc detected * perl: munmap_chunk(): invalid pointer: 0x0000000000b362e0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x7fb84952fc76]
...
======= Memory map: ========
00400000-0053d000 r-xp 00000000 08:01 182002 /usr/local/bin/perl
...
Is this due a bug?
perl -V:
Summary of my perl5 (revision 5 version 12 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.31.12-0.2-desktop, archname=x86_64-linux
uname='linux linux1 2.6.31.12-0.2-desktop #1 smp preempt 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 gnulinux '
config_args='-Dnoextensions=ODBM_File'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.1 [gcc-4_4-branch revision 150839]', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.10.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL
USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
USE_PERL_ATOF
Built under linux
Compiled at Apr 15 2010 13:25:46
@INC:
/usr/local/lib/perl5/site_perl/5.12.0/x86_64-linux
/usr/local/lib/perl5/site_perl/5.12.0
/usr/local/lib/perl5/5.12.0/x86_64-linux
/usr/local/lib/perl5/5.12.0
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
希望这个 Debian Bug 报告 #479698 是您的答案问题。
Hope, this Debian Bug report #479698 is answer of your question.