php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59723 Segmentation fault executing transformation
Submitted: 2011-04-19 18:04 UTC Modified: 2017-10-24 23:43 UTC
From: D dot Kingma at jool dot nl Assigned:
Status: Suspended Package: xslcache (PECL)
PHP Version: 5.2.16 OS: Ubuntu Linux 64bit
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-04-19 18:04 UTC] D dot Kingma at jool dot nl
Description:
------------
When replacing XsltProcessor with XslCache initialisation and importStylesheet work ok, but when executing the transformation it throws a segmentations fault. I have removed any xdebug/zend debugger / apc extension, but it still throws a segfault.

We used the 'pecl install xslcache' to install the module

Might be the same issue as the translit extension in #15627

PHP ini portion:

*xsl*
XSL 						enabled
libxslt Version 				1.1.22
libxslt compiled against libxml Version 	2.6.31
EXSLT 						enabled
libexslt Version 				1.1.24

*xslcache*
XSLCACHE 					enabled
libxslt Version 				1.1.22
libxslt compiled against libxml Version 	2.6.31
EXSLT 						enabled
libexslt Version 				1.1.22 

Expected result:
----------------
Valid transformation output

Actual result:
--------------
child pid 13906 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-06-05 15:15 UTC] felipe@php.net
Please, post a test case to reproduce such issue.
 [2011-06-06 10:14 UTC] D dot Kingma at jool dot nl
The bug is specific when you return a DOMElement from a registered php function.

Reproduction case:
xslcachetest.php:
<?php
function callXML() {
	$d = new domDocument();
	$d->loadXML('<ipub:result xmlns:ipub="http://wwwwww.wwwww.wwwww/sisisiis">yeah</ipub:result>');
	return $d->documentElement;
}

$dom = new domDocument;
$dom->loadXML('<?xml version="1.0"  encoding="iso-8859-1" ?><chapter language="en"></chapter>');

if(!$dom) {
	echo "Error while parsing the document\n";
	exit;
}
$xsl = dirname(__FILE__)."/xslcachetest.xsl";
 	
$orginalProcessor = false;
if($orginalProcessor) {
	$xslDoc = new domDocument;
	$xslDoc->load($xsl);
	$proc = new xsltprocessor;
	$proc->importStylesheet($xslDoc);
} else {
	$proc = new xsltcache;
	$proc->importStylesheet($xsl);
}

if(!$proc) {
	echo "Error while making xsltprocessor object\n";
	exit;
}

$proc->registerPHPFunctions('callXML');

print "\nhere";
print $proc->transformToXml($dom);
print "\nend";



xslcachetest.xsl
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl">
    <xsl:output  method="xml" indent="no"/>
    <xsl:template match="/">
		<html><body>
        <xsl:value-of select="php:function('callXML')"/>
		</body></html>
    </xsl:template>
</xsl:stylesheet>
 [2017-10-24 23:43 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 23:43 UTC] kalle@php.net
The xslcache package has not had a release since 2013, and its safe to say that development has ceased. In case the development of this package picks back up, then this report should be re-opened.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 23:01:27 2019 UTC