GNOME Bugzilla – Bug 422139
crash (bus error) on simple files
Last modified: 2007-03-27 12:53:25 UTC
Steps to reproduce: 1. Run the tst Perl script with the files given below. Stack trace: Date/Time: 2007-03-24 03:48:56.663 +0100 OS Version: 10.4.9 (Build 8P135) Report Version: 4 Command: perl Path: /opt/local/bin/perl Parent: zsh [1839] Version: ??? (???) PID: 6501 Thread: 0 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000068 Thread 0 Crashed: 0 libxml2.2.dylib 0x91d759fc xmlFreeNodeList + 36 1 libxml2.2.dylib 0x91d75abc xmlFreeNodeList + 228 2 libxml2.2.dylib 0x91d75abc xmlFreeNodeList + 228 3 libxml2.2.dylib 0x91d7346c xmlFreeDoc + 224 4 libxslt.1.dylib 0x00307004 xsltFreeStylesheet + 1060 (xslt.c:1003) 5 LibXSLT.bundle 0x00183e9c XS_XML__LibXSLT__Stylesheet_DESTROY + 204 6 perl 0x0005e99c Perl_pp_entersub + 1788 7 perl 0x0001b8d0 Perl_call_sv + 1568 8 perl 0x0002fe98 Perl_sv_clear + 968 9 perl 0x000307e8 Perl_sv_free + 328 10 perl 0x000ea194 Perl_leave_scope + 2116 11 perl 0x0005a7ec Perl_pp_leave + 652 12 perl 0x000bb9d4 Perl_runops_standard + 84 13 perl 0x0001c404 perl_run + 564 14 perl 0x00002fc0 main + 224 15 perl 0x00002afc _start + 760 16 perl 0x00002800 start + 48 Thread 0 crashed with PPC Thread State 64: srr0: 0x0000000091d759fc srr1: 0x100000000200f030 vrsave: 0x0000000000000000 cr: 0x42000404 xer: 0x0000000000000000 lr: 0x0000000091d759e8 ctr: 0x0000000000000001 r0: 0x0000000091d75abc r1: 0x00000000bfffd890 r2: 0x0000000000000000 r3: 0x0000000000000064 r4: 0x00000000004de8d0 r5: 0x00000000ffb214f0 r6: 0x0000000000000020 r7: 0x00000000ffffffff r8: 0x0000000000000001 r9: 0x00000000a0001fac r10: 0x0000000000000000 r11: 0x0000000042000402 r12: 0x0000000090006a0c r13: 0x0000000000000000 r14: 0x00000000001170f8 r15: 0x0000000000117108 r16: 0x0000000000117268 r17: 0x0000000000116bc0 r18: 0x0000000000116bb8 r19: 0x0000000000117130 r20: 0x0000000000117264 r21: 0x000000000010e2ac r22: 0x0000000000000080 r23: 0x0000000001864798 r24: 0x00000000004375d4 r25: 0x0000000000000000 r26: 0x0000000000000000 r27: 0x0000000000000000 r28: 0x00000000004dfaf0 r29: 0x0000000000000000 r30: 0x0000000000000064 r31: 0x0000000091d759e8 Binary Images Description: 0x1000 - 0x10dfff perl /opt/local/bin/perl 0x12c000 - 0x12dfff Common.bundle /opt/local/lib/perl5/vendor_perl/5.8.7/darwin-2level/auto/XML/LibXML/Common/Common.bundle 0x130000 - 0x142fff libz.1.dylib /opt/local/lib/libz.1.dylib 0x146000 - 0x148fff IO.bundle /opt/local/lib/perl5/5.8.8/darwin-2level/auto/IO/IO.bundle 0x14b000 - 0x178fff LibXML.bundle /opt/local/lib/perl5/vendor_perl/5.8.7/darwin-2level/auto/XML/LibXML/LibXML.bundle 0x180000 - 0x186fff LibXSLT.bundle /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level/auto/XML/LibXSLT/LibXSLT.bundle 0x18a000 - 0x199fff libexslt.0.dylib /opt/local/lib/libexslt.0.dylib 0x1cc000 - 0x1d4fff libintl.8.dylib /opt/local/lib/libintl.8.dylib 0x1ed000 - 0x1effff libgpg-error.0.dylib /opt/local/lib/libgpg-error.0.dylib 0x305000 - 0x334fff libxslt.1.dylib /opt/local/lib/libxslt.1.dylib 0x505000 - 0x5fefff libiconv.2.dylib /opt/local/lib/libiconv.2.dylib 0x64f000 - 0x69afff libgcrypt.11.dylib /opt/local/lib/libgcrypt.11.dylib 0x1008000 - 0x1119fff libxml2.2.dylib /opt/local/lib/libxml2.2.dylib 0x8fe00000 - 0x8fe52fff dyld 46.12 /usr/lib/dyld 0x90000000 - 0x901bdfff libSystem.B.dylib /usr/lib/libSystem.B.dylib 0x90215000 - 0x9021afff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib 0x907bc000 - 0x90895fff com.apple.CoreFoundation 6.4.7 (368.28) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x908e0000 - 0x909e2fff libicucore.A.dylib /usr/lib/libicucore.A.dylib 0x90a3c000 - 0x90ac0fff libobjc.A.dylib /usr/lib/libobjc.A.dylib 0x90b70000 - 0x90b82fff libauto.dylib /usr/lib/libauto.dylib 0x91110000 - 0x9111efff libz.1.dylib /usr/lib/libz.1.dylib 0x91426000 - 0x91431fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib 0x91d4d000 - 0x91e2bfff libxml2.2.dylib /usr/lib/libxml2.2.dylib 0x92a03000 - 0x92af1fff libiconv.2.dylib /usr/lib/libiconv.2.dylib 0x94c91000 - 0x94cb1fff libmx.A.dylib /usr/lib/libmx.A.dylib Model: PowerMac7,3, BootROM 5.2.4f1, 2 processors, PowerPC G5 (3.1), 2.7 GHz, 1.5 GB Graphics: ATI Radeon 9650, ATY,RV351, AGP, 256 MB Memory Module: DIMM0/J11, 256 MB, DDR SDRAM, PC3200U-30330 Memory Module: DIMM1/J12, 256 MB, DDR SDRAM, PC3200U-30330 Memory Module: DIMM2/J13, 512 MB, DDR SDRAM, PC3200U-30330 Memory Module: DIMM3/J14, 512 MB, DDR SDRAM, PC3200U-30330 Network Service: Ethernet intégré, Ethernet, en0 PCI Card: AlchemyTV, tv-card, SLOT-3 Serial ATA Device: Maxtor 6B250S0, 233.76 GB Parallel ATA Device: PIONEER DVD-RW DVR-109 USB Device: Hub in Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 500 mA USB Device: USB-PS/2 Optical Mouse, Logitech, Up to 1.5 Mb/sec, 100 mA USB Device: Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 250 mA Other information: I don't know what is the cause of the crash, but as the stack trace shows a crash in libxml2, I report the bug against this library. Perl script tst: #!/usr/bin/env perl use strict; use XML::LibXML; use XML::LibXSLT; my $parser = XML::LibXML->new(); my $xmldoc = $parser->parse_file("file.xml"); my $xslt = XML::LibXSLT->new(); my $style = $xslt->parse_stylesheet($parser->parse_file("file.xsl")); my $result = $style->transform($xmldoc); File file.xml: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"> </html> File file.xsl: <?xml version="1.0"?> <!-- --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="no"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> </xsl:stylesheet> Note: the XML comment is important to reproduce the crash! Software versions: Mac OS X 10.4.9 libxml2 2.6.27 libxslt 1.1.20 XML::LibXML 1.58 XML::LibXSLT 1.58 With libxslt 1.1.15, which I was previously using, I had no such problem. With some other files, I get a segmentation fault instead of a bus error.
I cannot reproduce the problem with xsltproc the C based tool paphio:~/tmp -> valgrind xsltproc file.xsl file.xml <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> </html> paphio:~/tmp -> I suspect the problem is related to your version of the perl bindings, which this bugzilla does not cover. Unless you can reproduce the problem with xsltproc or just a simple C program I really cannot help on this issue. You should report it to XML::LibXML and XML::LibXSLT maintainers, they should be able to help, I really can't on this issue. Daniel
I confirm that an upgrade of the Perl modules to the latest versions (from the new maintainer) solves the problem. BTW, I would have thought that there was some versioning support, but it doesn't seem to be the case, unless this was a real bug not related to versioning.