#19266 [NEW]: Segfault on append_child()

From: Date: Fri, 06 Sep 2002 15:17:23 +0000
Subject: #19266 [NEW]: Segfault on append_child()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18579@lists.php.net to get a copy of this message
From: pavlomr@hotmail.com Operating system: SuSE Linux 7.3 PHP version: 4CVS-2002-09-06 PHP Bug Type: DOM XML related Bug description: Segfault on append_child() This bug corelates with #18197 Prehistory: libxml-1.8.15, libxml2-2.4.23 './configure' \ '--prefix=/usr/share' \ '--datadir=/usr/share/php' \ '--bindir=/usr/bin' \ '--libdir=/usr/share' \ '--with-config-file-path=/etc' \ '--with-exec-dir=/usr/lib/php/bin' \ '--with-mysql=/usr' \ '--with-informix' \ '--with-gd=yes' \ '--enable-gd-native-ttf' \ '--enable-gd-imgstrttf' \ '--with-tiff-dir=/usr' \ '--with-jpeg-dir=/usr' \ '--with-png-dir=/usr' \ '--with-xpm-dir=/usr/X11R6' \ '--with-ldap=yes' \ '--with-zlib' \ '--with-zlib-dir' \ '--with-bz2' \ '--with-gmp' \ '--with-xml' \ '--with-xmlrpc' \ '--with-xslt-sablot' \ '--with-expat-dir=/usr' \ '--with-dom' \ '--with-dom-xslt' \ '--with-dom-exslt' \ '--with-ttf' \ '--with-t1lib' \ '--with-mcal=/usr' \ '--with-imap=yes' \ '--with-sablot' \ '--with-sablot-js' \ '--with-readline' \ '--with-ftp' \ '--with-ndbm' \ '--with-gdbm' \ '--with-mcrypt' \ '--with-gettext' \ '--with-mm' \ '--with-gd=yes' \ '--with-qtdom=/usr/lib/qt2' \ '--enable-versioning' \ '--enable-yp' \ '--enable-bcmath' \ '--enable-trans-sid' \ '--enable-inline-optimization' \ '--enable-track-vars' \ '--enable-magic-quotes' \ '--enable-safe-mode' \ '--enable-sockets' \ '--enable-sysvsem' \ '--enable-sysvshm' \ '--enable-shmop' \ '--enable-calendar' \ '--enable-mbstring' \ '--enable-mbstr-enc-trans' \ '--enable-exif' \ '--enable-ftp' \ '--enable-memory-limit' \ '--enable-wddx' \ '--enable-filepro' \ '--enable-dbase' \ '--enable-ctype' \ '--enable-force-cgi-redirect' \ '--enable-discard-path' \ '--enable-sigchild' \ '--with-openssl' \ '--with-imap-ssl' \ '--with-gd=yes' \ '--with-apxs=/usr/sbin/apxs' \ '--with-pgsql=/usr' \ '--with-snmp' \ '--with-iconv' \ '--with-iconv-dir' \ 'i686-suse-linux' \ "$@" script bug.php: <?php $x1="<?xml version='1.0' encoding='iso8859-1' ?> <root1 xml:lang='de' xmlns:xml='http://www.w3.org/XML/1998/namespace'> <node xml:lang='en'>1 EN node</node> <node xml:lang='de'>1 DE node</node> <node>1 Default node</node> </root1> "; $x2="<?xml version='1.0' encoding='iso8859-1' ?> <root2 xml:lang='en' xmlns:xml='http://www.w3.org/XML/1998/namespace'> <node xml:lang='en'>2 EN node</node> <node xml:lang='de'>2 DE node</node> <node> 2 Default node</node> </root2> "; $d1=domxml_open_mem($x1); $d2=domxml_open_mem($x2); $r1=$d1->document_element(); $r2=$d2->document_element(); $r1->append_child($r2); echo $d1->dump_mem(); ?> produce output: <?xml version="1.0" encoding="iso8859-1"?> <root1 xml:lang="de"> <node xml:lang="en">1 EN node</node> <node xml:lang="de">1 DE node</node> <node>1 Default node</node> <root2 xml:lang="en"> <node xml:lang="en">2 EN node</node> <node xml:lang="de">2 DE node</node> <node> 2 Default node</node> </root2></root1> Segmentation fault Script segfaults WITH AND WITHOUT xmlns:xml declaration -- Edit bug report at http://bugs.php.net/?id=19266&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19266&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19266&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19266&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19266&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19266&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19266&r=support Expected behavior: http://bugs.php.net/fix.php?id=19266&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19266&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19266&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19266&r=globals

« previous php.bugs (#18579) next »