#41485 [Opn-Fbk]: segmentation fault parsing wrong xsl file

2007-06-25 Thread sniper
 ID:   41485
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andyjunkie at tiscali dot it
-Status:   Open
+Status:   Feedback
 Bug Type: XSLT related
 Operating System: linux debian
 PHP Version:  5.2.2
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to Open. Thank you for helping
us make PHP better.




Previous Comments:


[2007-06-20 14:07:00] andyjunkie at tiscali dot it

No crash from command line.

Crashes with:
Debian 2.6.18-4-686
Apache/2.2.3 (Debian) 
PHP/5.2.0-8+etch4
libxml2 2.6.27
libxslt 1.1.19



[2007-06-08 01:12:54] [EMAIL PROTECTED]

Works for me on Linux Fedora 6.



[2007-06-01 15:00:52] [EMAIL PROTECTED]

You might want to try using xsltproc command line to see if it crashes
there as well (indicating not a PHP issue). Also, try upgrading your
libxml2 and libxslt libraries.
It's working fine on linux with libxml2-2.6.23 and libxslt-1.1.15



[2007-06-01 14:33:15] andyjunkie at tiscali dot it

?php
$xsl = '?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:template match=/
br
/xsl:template
/xsl:stylesheet';

$xsltProcessor = new XSLTProcessor();
$xslDom = new DOMDocument();
$xslDom-loadXML($xsl);
$xsltProcessor-importStyleSheet($xslDom);
?



[2007-06-01 14:27:54] andyjunkie at tiscali dot it

Here is the script:
?php
$xsltProcessor = new XSLTProcessor();
$xslDom = new DOMDocument();
$xslDom-load(dirname(__FILE__).'/test.xsl');
$xsltProcessor-importStyleSheet($xslDom); // SEG FAULT
?
This is the content of test.xsl, note that br tag is not closed

?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/
br
/xsl:template

/xsl:stylesheet



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/41485

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


#41485 [Opn-Fbk]: segmentation fault parsing wrong xsl file

2007-06-01 Thread rrichards
 ID:   41485
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andyjunkie at tiscali dot it
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: linux debian
 PHP Version:  5.2.2
 New Comment:

You might want to try using xsltproc command line to see if it crashes
there as well (indicating not a PHP issue). Also, try upgrading your
libxml2 and libxslt libraries.
It's working fine on linux with libxml2-2.6.23 and libxslt-1.1.15


Previous Comments:


[2007-06-01 14:33:15] andyjunkie at tiscali dot it

?php
$xsl = '?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:template match=/
br
/xsl:template
/xsl:stylesheet';

$xsltProcessor = new XSLTProcessor();
$xslDom = new DOMDocument();
$xslDom-loadXML($xsl);
$xsltProcessor-importStyleSheet($xslDom);
?



[2007-06-01 14:27:54] andyjunkie at tiscali dot it

Here is the script:
?php
$xsltProcessor = new XSLTProcessor();
$xslDom = new DOMDocument();
$xslDom-load(dirname(__FILE__).'/test.xsl');
$xsltProcessor-importStyleSheet($xslDom); // SEG FAULT
?
This is the content of test.xsl, note that br tag is not closed

?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:template match=/
br
/xsl:template

/xsl:stylesheet



[2007-05-27 17:32:15] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.





[2007-05-24 20:58:18] andyjunkie at tiscali dot it

The problem is present also if an undeclared entity (foobar;) is used
inside the xsl file



[2007-05-24 09:13:02] andyjunkie at tiscali dot it

Description:

an attempt to load an xsl template file, which has an open/close tag
mismatch problem, finishes with a segmentation fault. Always works ok on
windows system (generates an error message) but crashes on Linux Debian
Etch. Problem is reproduced on 5.1.6 and 5.2.2 versions of PHP, no other
versions have been tested.

Reproduce code:
---
class Xtp extends XSLTProcessor {
public function __construct() {
$this-registerPHPFunctions();
$xsl = new DOMDocument();
$xsl-resolveExternals = true;
$xsl-substituteEntities = true;

if ($template = $this-locateTemplate()) {
$xsl-load($template);
$this-importStyleSheet($xsl); /* SEG FAULT */
}
}

Expected result:

An error message like this:  DOMDocument::load()
[function.DOMDocument-load]: Opening and ending tag mismatch: ...

Actual result:
--
error handling function is called (if any is set with
set_error_handler($func)), on the return of this function segfault
appears.





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


#41485 [Opn-Fbk]: segmentation fault parsing wrong xsl file

2007-05-27 Thread iliaa
 ID:   41485
 Updated by:   [EMAIL PROTECTED]
 Reported By:  andyjunkie at tiscali dot it
-Status:   Open
+Status:   Feedback
 Bug Type: Reproducible crash
 Operating System: linux debian
 PHP Version:  5.2.2
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ?php and ends with ?,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




Previous Comments:


[2007-05-24 20:58:18] andyjunkie at tiscali dot it

The problem is present also if an undeclared entity (foobar;) is used
inside the xsl file



[2007-05-24 09:13:02] andyjunkie at tiscali dot it

Description:

an attempt to load an xsl template file, which has an open/close tag
mismatch problem, finishes with a segmentation fault. Always works ok on
windows system (generates an error message) but crashes on Linux Debian
Etch. Problem is reproduced on 5.1.6 and 5.2.2 versions of PHP, no other
versions have been tested.

Reproduce code:
---
class Xtp extends XSLTProcessor {
public function __construct() {
$this-registerPHPFunctions();
$xsl = new DOMDocument();
$xsl-resolveExternals = true;
$xsl-substituteEntities = true;

if ($template = $this-locateTemplate()) {
$xsl-load($template);
$this-importStyleSheet($xsl); /* SEG FAULT */
}
}

Expected result:

An error message like this:  DOMDocument::load()
[function.DOMDocument-load]: Opening and ending tag mismatch: ...

Actual result:
--
error handling function is called (if any is set with
set_error_handler($func)), on the return of this function segfault
appears.





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