|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-01 07:11 UTC] mfischer@php.net
[2002-01-01 11:15 UTC] mfkahn2 at yahoo dot com
[2002-01-01 12:45 UTC] mfischer@php.net
[2002-01-01 16:14 UTC] mfkahn2 at yahoo dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 20:00:01 2025 UTC |
Symptoms: - using unlink() causes segfault Script to reproduce: <?php $xml = <<<END_XML <?xml version="1.0"?> <test> <foo id="x">Hello</foo> <foo id="y">World</foo> </test> END_XML; $dom = xmldoc($xml); // this so I can see it. header('Content-type: text/plain'); $ctx = $dom->xpath_new_context(); $res = xpath_eval($ctx,"//foo"); foreach ($res->nodeset as $child) { $child->unlink(); } echo $dom->dumpmem(); ?> Other notes: - some cursory debugging I did suggested that it was the cleanup routines at the end of the script that were causing the crash. Looking at php_domxml.c, the recursive node memory cleanup appears to be choking on a pointer already freed during the unlink() call.