[php-src] master: ext/fileinfo/tests/bug78987.phpt: increase a memory limit

From: Date: Thu, 11 Apr 2024 13:58:36 +0000
Subject: [php-src] master: ext/fileinfo/tests/bug78987.phpt: increase a memory limit
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-128075@lists.php.net to get a copy of this message
Author: Michael Orlitzky (orlitzky) Committer: Niels Dossche (nielsdos) Date: 2024-04-11T15:58:06+02:00 Commit: https://github.com/php/php-src/commit/4ded247675a0be30664880fc2b2875d21ffc482a Raw diff: https://github.com/php/php-src/commit/4ded247675a0be30664880fc2b2875d21ffc482a.diff ext/fileinfo/tests/bug78987.phpt: increase a memory limit This test performs a few checks to ensure that "not too much" memory is used while fileinfo is detecting encodings. It is however platform specific, and memory usage varies across hosts and as libmagic changes. Recently a Gentoo user reported a failure in this test at, https://bugs.gentoo.org/927461 on a big-endian PPC64 machine with output, ---- EXPECTED OUTPUT 131072 => ok 262144 => ok 524288 => ok 1048576 => ok 2097152 => ok 4194304 => ok 8388608 => ok 16777216 => ok ---- ACTUAL OUTPUT 131072 => 10092544 262144 => 10092544 524288 => 12189696 1048576 => 12189696 2097152 => 14352384 4194304 => 18612224 8388608 => 24903680 16777216 => 37486592 ---- FAILED Those numbers are with 8.3.4 and therefore missing commit b7c5813c which also raises the limits. Checking the "actual" numbers above against the current values, we see that the limit for 524288 would need to be bumped to 12189696 to allow this test to pass. Since that seems reasonable, that's what this commit does. Closes GH-13795 Closes GH-13940 Changed paths: M NEWS M ext/fileinfo/tests/bug78987.phpt Diff: diff --git a/NEWS b/NEWS index d403e2fad3ca0..736fa7d4f53d6 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,10 @@ PHP NEWS . Fixed bug GH-13903 (ASAN false positive underflow when executing copy()). (nielsdos) +- Fileinfo: + . Fixed bug GH-13795 (Test failing in ext/fileinfo/tests/bug78987.phpt on + big-endian PPC). (orlitzky) + - FPM: . Fixed bug GH-13563 (Setting bool values via env in FPM config fails). (Jakub Zelenka) diff --git a/ext/fileinfo/tests/bug78987.phpt b/ext/fileinfo/tests/bug78987.phpt index 423ecb1b85179..ab7d9cad7167f 100644 --- a/ext/fileinfo/tests/bug78987.phpt +++ b/ext/fileinfo/tests/bug78987.phpt @@ -11,14 +11,14 @@ $minSize = 128 * 1024; $maxSize = 16 * 1024 * 1024; $map = array( - 131072 => 10055680, - 262144 => 10055680, - 524288 => 11898880, - 1048576 => 12152832, - 2097152 => 14254080, - 4194304 => 18452480, - 8388608 => 24743936, - 16777216 => 37326848, + 131072 => 10612736, + 262144 => 10612736, + 524288 => 12189696, + 1048576 => 12709888, + 2097152 => 14811136, + 4194304 => 19009536, + 8388608 => 25300992, + 16777216 => 37883904, ); for($size = $minSize; $size <= $maxSize; $size *= 2) { $content = str_repeat('0', $size);

« previous php.cvs (#128075) next »