ID:               27878
 Updated by:       [EMAIL PROTECTED]
 Reported By:      fjortiz at comunet dot es
-Status:           Open
+Status:           Feedback
 Bug Type:         XSLT related
 Operating System: Win32
 PHP Version:      5.0.0RC1
 New Comment:

I cant reproduce this. What libxml and libxslt versions are you using,
where did you get them, how did you build the xsl extension (shared or
static) and how did you compile in the libxslt support (static or
shared)?


Previous Comments:
------------------------------------------------------------------------

[2004-04-06 02:48:10] fjortiz at comunet dot es

Description:
------------
I guess some extra checks should be added to the (great!) new DOM/XSLT
processor. Or maybe it's a libxml crash...



Only happens when the error is in the included file.



Sample XSL below:



file.xsl: see the "' '" at the param "strDelimiter". No
crash if select="' '"



<?xml version='1.0' encoding='utf-8' ?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">



        <xsl:output method="xml" indent="yes"/>



        <xsl:template name="Split">

                <xsl:param name="strInput" select="&apos;&apos;"/>

                <xsl:param name="strDelimiter" select="&apos;&nbsp;&apos;"/>

<!-- stripped, enough to see the crash -->

        </xsl:template>



</xsl:stylesheet>



And then drill6.xsl includes file.xsl:



<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">



        <xsl:output method="xml" indent="yes"/>

        <xsl:include href="file.xsl"/>



        <xsl:template match="/">

                <datos>

                        <xsl:call-template name="Split">

                                <xsl:with-param name="strInput" select="."/>

                                <xsl:with-param name="strDelimiter" select="' '"/>

                        </xsl:call-template>

                </datos>

        </xsl:template>

                

</xsl:stylesheet>





Reproduce code:
---------------
<?

header("Content-type: text/xml; charset=ISO-8859-1;") ; 



$xml =& new DomDocument() ; 

$xml->load("datos.xml");



$xsl =& new DomDocument();

$xsl->load("drill6.xsl");

$proc = new xsltprocessor;

$proc->importStylesheet($xsl);

$string = $proc->transformToXml($xml);



print "$string";



?>



Actual result:
--------------
Unhandled exception at 0x009bb86d (php5ts_debug.dll) in Apache.exe:
0xC0000005: Access violation reading location 0xdddddddd.



xsltprocessor.c line 326

sheetp = xsltParseStylesheetDoc(newdoc);



Call Stack:

        php5ts_debug.dll!_xmlDictFree()  + 0xd  C

        php5ts_debug.dll!_xmlDictFree()  + 0x29 C

        php5ts_debug.dll!_xsltFreeStylesheet()  + 0x1a2 C

        php5ts_debug.dll!_xsltParseStylesheetImportedDoc()  + 0x8f      C

        php5ts_debug.dll!_xsltParseStylesheetDoc()  + 0xd       C

>       php5ts_debug.dll!zif_xsl_xsltprocessor_import_stylesheet(int ht=1,
_zval_struct * return_value=0x02786518, _zval_struct *
this_ptr=0x02796030, int return_value_used=0, void * * *
tsrm_ls=0x02777440)  Line 326 + 0x9     C

        php5ts_debug.dll!zend_do_fcall_common_helper(_zend_execute_data *
execute_data=0x018ff558, _zend_op * opline=0x02799e98, _zend_op_array *
op_array=0x02797bb0, void * * * tsrm_ls=0x02777440)  Line 2665 +
0x32    C

        php5ts_debug.dll!zend_do_fcall_by_name_handler(_zend_execute_data *
execute_data=0x018ff558, _zend_op * opline=0x02799e98, _zend_op_array *
op_array=0x02797bb0, void * * * tsrm_ls=0x02777440)  Line 2776 +
0x15    C

        php5ts_debug.dll!execute(_zend_op_array * op_array=0x02797bb0, void *
* * tsrm_ls=0x02777440)  Line 1339 + 0x17       C

        php5ts_debug.dll!zend_execute_scripts(int type=8, void * * *
tsrm_ls=0x02777440, _zval_struct * * retval=0x00000000, int
file_count=3, ...)  Line 1046 + 0x21    C

        php5ts_debug.dll!php_execute_script(_zend_file_handle *
primary_file=0x018ffbb0, void * * * tsrm_ls=0x02777440)  Line 1628 +
0x1b    C

        php5apache.dll!apache_php_module_main(request_rec * r=0x01054068, int
display_source_mode=0, void * * * tsrm_ls=0x02777440)  Line 54 +
0x10    C

        php5apache.dll!send_php(request_rec * r=0x01054068, int
display_source_mode=0, char * filename=0x01054bd0)  Line 621 + 0x11     C

        php5apache.dll!send_parsed_php(request_rec * r=0x01054068)  Line 636
+ 0xd   C

        ApacheCore.dll!6ff64ae7()       

        ApacheCore.dll!6ff73f94()       

        ApacheCore.dll!6ff73d06()       

        ApacheCore.dll!6ff6b8ff()       

        msvcrt.dll!780085bc()   

        KERNEL32.DLL!7c4e987c()         




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27878&edit=1

Reply via email to