I am getting random Segmentation faults when I use
the following script. This does not happen when I run
scripts that do not include the xslt_process()
So I am assuming it has something to do with Sablotron and xslt.
Below is also the back trace with the problem.
Can anyone suggest a solution or next step?


<?php 
$xml = "./file.xml";
$xsl = "./file.xsl";
ob_start();

$_parser = xslt_create(); 

if( !$result = @xslt_process(  $_parser,    // resource xh
                               $xml,        // string xml
                               $xsl        // string xsl
                             ) ) {
    printf( "Sablotron Error (%s): <br /><strong>%s</strong>", 
            xslt_errno($_parser), xslt_error($_parser) );
}
ob_end_clean();
xslt_free($_parser);
echo $result;
?>

Starting program: /usr/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
__libc_free (mem=0x2) at malloc.c:3135
3135    malloc.c: No such file or directory.
        in malloc.c
(gdb) bt
#0  __libc_free (mem=0x2) at malloc.c:3135
#1  0x0808a177 in hashTableDestroy ()
#2  0x080890c2 in XML_ErrorString ()
#3  0x080833ea in XML_ParserFree ()
#4  0x4040fd29 in TreeConstructer::parseDataLineUsingExpat (this=0xbfffdcc4, 
S=@0x81202d0,
    t=0x8132990, d=0x8131fc0, base_=0x0) at parser.cpp:149
#5  0x40432767 in Tree::parse (this=0x8132990, S=@0x81202d0, d=0x8131fc0) at 
tree.cpp:1373
#6  0x40416328 in Processor::addLineParse (this=0x8120348, S=@0x81202d0, 
newTree=@0x8120348,
    absolute=@0xbfffdda0, isXSL=0, ignoreErr=0) at proc.cpp:573
#7  0x404168d2 in Processor::readTreeFromURI (this=0x8120348, S=@0x81202d0, 
newTree=@0x8120348,
    location=@0xbfffde40, base=@0xbfffde28, isXSL=0, ignoreErr=0) at proc.cpp:621
#8  0x4041482d in Processor::open (this=0x8120348, S=@0x81202d0,
    sheetURI=0x810ba6c "./aaindex.xsl", inputURI=0x810b994 "./aanews.xml") at 
proc.cpp:303
#9  0x4041e5d7 in SablotRunProcessor (processor_=0x8120348, sheetURI=0x810ba6c 
"./aaindex.xsl",
    inputURI=0x810b994 "./aanews.xml", resultURI=0x40374da3 "arg:/_result", params=0x0,
    arguments=0x0) at sablot.cpp:450
#10 0x4034813b in zif_xslt_process (ht=3, return_value=0x81207ec, this_ptr=0x0,
    return_value_used=1) at sablot.c:512
#11 0x4026e047 in execute (op_array=0x81121dc) at ./zend_execute.c:1598
#12 0x4027f994 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810
#13 0x40292f35 in php_execute_script (primary_file=0xbffff4e8) at main.c:1381
#14 0x4028d600 in apache_php_module_main (r=0x8109544, display_source_mode=0) at 
sapi_apache.c:90
#15 0x4028e538 in send_php (r=0x8109544, display_source_mode=0,
    filename=0x8109c4c "/var/www/htdocs/index.php") at mod_php4.c:575
#16 0x4028e5bb in send_parsed_php (r=0x8109544) at mod_php4.c:590
#17 0x08055439 in ap_invoke_handler ()
#18 0x0806b0cf in ap_some_auth_required ()
#19 0x0806b536 in ap_internal_redirect ()
#20 0x401d1daa in handle_dir () from /usr/libexec/mod_dir.so
#21 0x08055439 in ap_invoke_handler ()
#22 0x0806b0cf in ap_some_auth_required ()
#23 0x0806b136 in ap_process_request ()
#24 0x08061ae6 in ap_child_terminate ()
#25 0x08061cc5 in ap_child_terminate ()
#26 0x08061e3c in ap_child_terminate ()
#27 0x080624cd in ap_child_terminate ()
#28 0x08062d5c in main ()
#29 0x4009217d in __libc_start_main (main=0x8062998 <main>, argc=2, ubp_av=0xbffffa04,
    init=0x804f348 <_init>, fini=0x809adc0 <_fini>, rtld_fini=0x4000a534 <_dl_fini>,
    stack_end=0xbffff9fc) at ../sysdeps/generic/libc-start.c:129
(gdb)


-- 
Bill
Amsterdam, NL

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to