From: andyjunkie at tiscali dot it
Operating system: linux debian
PHP version: 5.2.2
PHP Bug Type: Reproducible crash
Bug description: segmentation fault parsing wrong xsl file
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 bug report at http://bugs.php.net/?id=41485&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41485&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41485&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41485&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41485&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41485&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41485&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41485&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41485&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41485&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41485&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41485&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41485&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41485&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41485&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41485&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41485&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41485&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41485&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41485&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41485&r=mysqlcfg