So ... php-5.1.0b2 with --disable-zend-mm --enable-debug ... apache segfaults on
startup.
Without --disable-zend-nm, and run through valgrind, I don't actually experience
the corruption, but boy is there a lot of output. Hope you like to read ;)
I've included urls for the --disable-zend-mm segfaulting valgrind output (pid
30703), and the non --disable-zend-mm (pid 27107) below that.
There is no interesting output from valgrind with php-5.0.4 and the same script.
Without zend mm
----------------------------------------------------------
https://www.die.net/tmp/6f51b90defa5c822.txt/withoutmm.txt
With zend mm
----------------------------------------------------------
https://www.die.net/tmp/00e9a7d1e7a5d0fc.txt/withmm.txt
-james
Rasmus Lerdorf wrote:
James Crumpton wrote:
I've run into a problem, when trying out 5.1.0b1, b2, and
php5-200507060230, with a script of mine that relies pretty heavily on
DomDocument and DomXPath.
Using XPath, I pull nodes with a certain namespace (xx) from an xml
document. With 5.0.*, this works as expected.
However, with 5.1.*, I'm getting what appears to memory corruption(?) of
the DomNode localName property.
Previously
echo $node->nodeName;
echo $node->localName;
would yeild
xx:nodename
nodename
With 5.1, I'm getting instead
xx:Õ¤9domN9dš9Øû
Õ¤9domN9dš9Øû
In reducing the operations to a simple:
$string = '<root xmlns:xx="xx"><xx:nodename /></root>';
$dom = new DomDocument;
$dom->loadXML($string);
foreach ($xpath->query('descendant-or-self::xx:*') as $node) {
echo $node->nodeName;
}
... i don't get the corrupt node names. Only when used in the larger
application framework do I run into the problem.
I'm at a loss as to how to further troubleshoot this. And as the script
isn't causing a segfault, I don't really know what other information to
provide, or where to look.
Any pointers or help with this would be much appreciated.
If you could run this thing under Valgrind and send us the output, it
would help a lot.
-Rasmus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php