Bug #76738 [Ver]: dom extension horrible broken in 7.3 master

From: Date: Mon, 13 Aug 2018 17:37:45 +0000
Subject: Bug #76738 [Ver]: dom extension horrible broken in 7.3 master
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216767@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76738&edit=1 ID: 76738 Updated by: requinix@php.net Reported by: spam2 at rhsoft dot net Summary: dom extension horrible broken in 7.3 master Status: Verified Type: Bug Package: DOM XML related PHP Version: 7.3Git-2018-08-13 (Git) Assigned To: ab Block user comment: N Private report: N New Comment: > how can it be a libxml problem when blah blah blah Because the change for the bug I cited is the first time PHP has used htmlNodeDumpFormatOutput(). If that's where the bug is then of course it's never been a problem before. > there are different dom related tests faling Do any of them have to do with DOMDocument::saveHTML? Because if so then they are relevant here. Previous Comments: ------------------------------------------------------------------------ [2018-08-13 17:28:21] spam2 at rhsoft dot net how can it be a libxml problem when it's the identical environment (Fedora 28, gcc-8.2.1-1.fc28.x86_64, libxml2-devel-2.9.8-4.fc28.x86_64) where i take a tarball from https://git.php.net/?p=php-src.git put it into rpmbuild/SOURCES and fire up "rpmbuild -bb php.spec" which as part of the build process runs our test-suite and stops the build if it fails? it fails not only that one example, there are different dom related tests faling hwich are running for years on several PHP and Fedora versions and it took me enough time to isolate that one which is only an example of a underlying issue ------------------------------------------------------------------------ [2018-08-13 17:17:22] requinix@php.net Likely introduced with bug #76285 https://github.com/php/php-src/commit/ef9ed19ec7f141311feea1d42467f5773cfc09bc Not sure if PHP bug or libxml bug. I kinda suspect the latter since nothing seems obviously wrong on the PHP side. It's clearly an issue related to buffering; rather than try to explain the behavior, take the repro script and 1. Remove the $test_string= line 2. Add $test_string=<<<FOO (the content from the 7.2.9 output) FOO; 3. Run to get the 7.3.0 output 4. Duplicate one or two of the MUSIK <li>s 5. Run again to get output that's cutoff differently The cutoff happens at buffered points, like |</li> or li|> or |li> and never l|i>. The first one happens at 4060 bytes of output, which is close to both 4000 (libxml's BASE_BUFFER_SIZE) and 4KB. ------------------------------------------------------------------------ [2018-08-13 14:41:14] spam2 at rhsoft dot net Description: ------------ the script https://access.thelounge.net/harry/php-7.3-dom/dom-bug-script.txt is supposed to clean up WYSIWYG content directly after load it from the database for years now with php5.4 to 7.2.9 the result is the first version and now you get just a random fragment, also other tests using that inline copied class are broken with random results https://access.thelounge.net/harry/php-7.3-dom/7.2.9.txt https://access.thelounge.net/harry/php-7.3-dom/7.3.0.txt Test script: --------------- https://access.thelounge.net/harry/php-7.3-dom/dom-bug-script.txt Expected result: ---------------- https://access.thelounge.net/harry/php-7.3-dom/7.2.9.txt Actual result: -------------- https://access.thelounge.net/harry/php-7.3-dom/7.3.0.txt ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76738&edit=1

« previous php.bugs (#216767) next »