【问题标题】:Why does perl crash with "*** glibc detected *** perl: munmap_chunk(): invalid pointer"?为什么 perl 会因“*** glibc detected *** perl: munmap_chunk(): invalid pointer”而崩溃?
【发布时间】:2011-02-11 10:53:01
【问题描述】:
#!/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(revision 5 version 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 preempt 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 gnulinux' config_args='-Dnoextensions=ODBM_File' 提示=推荐,useposix=true,d_sigaction=define useithreads=undef,usemultiplicity=undef useperlio=define,d_sfio=undef,uselargefiles=define,usesocks=undef use64bitint=define,use64bitall=define,uselongdouble=undef 使用mymalloc=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-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,原型=定义
链接器和库:
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 .

【问题讨论】:

  • 当您遇到这些问题时,请指定平台、perl 的版本、perl 的来源(包、自编译等)以及编译细节。这可能是最简单的,只需向我们展示perl -V 的输出即可。

标签: perl pointers glibc


【解决方案1】:

希望,Debian Bug report #479698 是您问题的答案。

【讨论】:

  • 在 perl/5.10.0-11.1 版本中修复,但我使用 perl 5.12 我在脚本中更改了一些内容,现在我不再收到此消息。
  • 并非如此。这是 SVN::_Repos 的双重免费。这是 XML::LibXML 中的双重免费。
猜你喜欢
  • 1970-01-01
  • 2021-10-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-16
  • 2021-08-23
相关资源
最近更新 更多