Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6109397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:24:00+00:00 2026-05-23T14:24:00+00:00

I’ve been trying to debug a memory corruption problem with Perl 5 and XML::LibXML

  • 0

I’ve been trying to debug a memory corruption problem with Perl 5 and XML::LibXML (which I now maintain). Now here’s what I’m getting:

shlomif@lap:~/progs/perl/cpan/XML/LibXML/bugs/perl-xml-libxml-bugs/XML-LibXML-reader-segfault$ make test
XML_CATALOG_FILES="`pwd`/sgml-lib/catalog.xml" perl find_ascii_quotes.pl index.html
*** glibc detected *** perl: corrupted double-linked list: 0x0000000001474b40 ***
^Cmake: *** [test] Interrupt

And then the Perl process gets stuck and won’t return to the shell. The thing is, the fact that the Perl process gets halted interrupts my flow, and I’m looking for a way for the process to just crash or whatever instead of hanging there. GDB reports the stuff below. One can find the code in question in its Mercurial repository (just run “make test”), and I’m on Mandriva Linux development (Cooker) on x86-64.

ader-segfault$ gdb --command=cmds.gdb /usr/bin/perl
GNU gdb (GDB) 7.1-5 (Mandriva Linux release 2011.0)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mandriva-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/perl...
warning: the debug information found in "/usr/lib/debug//usr/bin/perl5.12.3.debug" does not match "/usr/bin/perl" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/bin/perl5.12.3.debug" does not match "/usr/bin/perl" (CRC mismatch).

(no debugging symbols found)...done.
warning: the debug information found in "/usr/lib/debug//usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so" (CRC mismatch).

[Thread debugging using libthread_db enabled]
warning: the debug information found in "/usr/lib/debug//usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Encode/Encode.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Encode/Encode.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Encode/Encode.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Encode/Encode.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Data/Dumper/Dumper.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Data/Dumper/Dumper.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Data/Dumper/Dumper.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/Data/Dumper/Dumper.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/IO/IO.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/IO/IO.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/IO/IO.so.debug" does not match "/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/auto/IO/IO.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so.debug" does not match "/usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug/usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so.debug" does not match "/usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so" (CRC mismatch).

*** glibc detected *** /usr/bin/perl: corrupted double-linked list: 0x0000000000b83440 ***
^C
Program received signal SIGINT, Interrupt.
0x00007ffff6abe12e in __lll_lock_wait_private () from /lib64/libc.so.6
Missing debug package(s), you should install: perl-debug-5.12.3-8.x86_64
(gdb) bt
#0  0x00007ffff6abe12e in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x00007ffff6a4f7a1 in _L_lock_9854 () from /lib64/libc.so.6
#2  0x00007ffff6a4d6eb in malloc () from /lib64/libc.so.6
#3  0x00007ffff6a43d6d in __libc_message () from /lib64/libc.so.6
#4  0x00007ffff6a49bfa in malloc_printerr () from /lib64/libc.so.6
#5  0x00007ffff6a49f38 in malloc_consolidate.part.3 () from /lib64/libc.so.6
#6  0x00007ffff6a4a749 in _int_free () from /lib64/libc.so.6
#7  0x00007ffff4e8b0e0 in xmlHashFree__internal_alias (table=0xb2db40,
    f=0x7ffff4e98e00 <xmlFreeAttribute>) at hash.c:324
#8  0x00007ffff4e82e42 in xmlFreeDtd__internal_alias (cur=0x633310)
    at tree.c:1126
#9  0x00007ffff4e8259a in xmlFreeDoc__internal_alias (cur=0x635100)
    at tree.c:1227
#10 0x00007ffff51e75a5 in PmmREFCNT_dec ()
   from /usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so
#11 0x00007ffff51c4f65 in XS_XML__LibXML__Node_DESTROY ()
   from /usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so
#12 0x00007ffff7b1d60d in Perl_pp_entersub ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#13 0x00007ffff7ab9242 in Perl_call_sv ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
---Type <return> to continue, or q <return> to quit---
#14 0x00007ffff7b22cfa in Perl_sv_clear ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#15 0x00007ffff7b23552 in Perl_sv_free2 ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#16 0x00007ffff7b2314d in Perl_sv_clear ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#17 0x00007ffff7b23552 in Perl_sv_free2 ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#18 0x00007ffff51a6ad9 in XS_XML__LibXML__Reader__DESTROY ()
   from /usr/lib/perl5/vendor_perl/5.12.3/x86_64-linux-thread-multi/auto/XML/LibXML/LibXML.so
#19 0x00007ffff7b1d60d in Perl_pp_entersub ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#20 0x00007ffff7b14d70 in Perl_runops_standard ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#21 0x00007ffff7ab9083 in Perl_call_sv ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#22 0x00007ffff7b22cfa in Perl_sv_clear ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#23 0x00007ffff7b23552 in Perl_sv_free2 ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#24 0x00007ffff7b4a45f in Perl_leave_scope ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
---Type <return> to continue, or q <return> to quit---
#25 0x00007ffff7b15ad2 in Perl_pp_unstack ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#26 0x00007ffff7b14d70 in Perl_runops_standard ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#27 0x00007ffff7abed6e in perl_run ()
   from /usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/libperl.so
#28 0x0000000000400e29 in main ()
(gdb)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:24:01+00:00Added an answer on May 23, 2026 at 2:24 pm

    You can control the behaviour of glibc’s memory checking with the MALLOC_CHECK_ environment variable. If you set this to ‘3’ then it will print a message and abort() on any detected error.

    See glibc’s heap consistency checking documentation for for information – this actually might help you debug the error as enabling MALLOC_CHECK_ will perform consistency checks more often than it does by default (and hence catch the error sooner).

    You may also want to look into Valgrind (if you haven’t already) to assist in finding your corruption issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.