php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80400 many zlib fails with different zlib implementation
Submitted: 2020-11-22 18:42 UTC Modified: 2020-11-24 14:21 UTC
From: bjornar dot ness at gmail dot com Assigned:
Status: Open Package: Zlib related
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bjornar dot ness at gmail dot com
New email:
PHP Version: OS:

 

 [2020-11-22 18:42 UTC] bjornar dot ness at gmail dot com
Description:
------------
Various zlib tests are depends on exact zlib impementation output/behavior,
and makes lots of tests fail with i.e cloudflare/zlib

Perhaps it is possible to rewrite some of these tests to be less implementation spesific?

The following tests fail:

Bug #71417: fread() does not detect decoding errors from filter zlib.inflate [ext/zlib/tests/bug71417.phpt]
Test gzcompress() function : basic functionality [ext/zlib/tests/gzcompress_basic1.phpt]
Test gzcompress() function : variation [ext/zlib/tests/gzcompress_variation1.phpt]
Test gzdeflate() function : basic functionality [ext/zlib/tests/gzdeflate_basic1.phpt]
Test gzdeflate() function : variation [ext/zlib/tests/gzdeflate_variation1.phpt]
Test gzencode() function : basic functionality [ext/zlib/tests/gzencode_basic1.phpt]
Test gzencode() function : variation [ext/zlib/tests/gzencode_variation1.phpt]
Bug #42663 (gzinflate() try to allocate all memory with truncated $data) [ext/zlib/tests/gzinflate-bug42663.phpt]
zlib.deflate (with convert.base64-encode) [ext/zlib/tests/zlib_filter_deflate.phpt]
zlib.deflate (with level parameter set) [ext/zlib/tests/zlib_filter_deflate2.phpt]



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-22 20:03 UTC] nikic@php.net
Could you please share the test diffs you're seeing? ("cat ext/zlib/tests/*.diff" or so?)
 [2020-11-23 08:25 UTC] bjornar dot ness at gmail dot com
# tail -n+1 ext/zlib/tests/*.diff
==> ext/zlib/tests/bug71417.diff <==
--
     gzdecode(): 
     Warning: gzdecode(): data error in %s on line %d
     
010+ read: string(33) "The quick brown fox jumps over th"
010- read: string(32) "The quick brown fox jumps over t"
     gzdecode(): 
     Warning: gzdecode(): data error in %s on line %d
     
--
==> ext/zlib/tests/gzcompress_basic1.diff <==
     *** Testing gzcompress() : basic functionality ***
     -- Compression level -1 --
003+ string(32) "368844871f7e9f35caded720e987aae1"
003- string(32) "764809aef15bb34cb73ad49ecb600d99"
     int(0)
     -- Compression level 0 --
     string(32) "d0136b3fb5424142c0eb26dfec8f56fe"
     int(0)
     -- Compression level 1 --
009+ string(32) "3e53a912d68ec408127f21700496c2e9"
009- string(32) "c2e070f4320d1f674965eaab95b53d9c"
     int(0)
     -- Compression level 2 --
012+ string(32) "33670b7695f074cdf78adf5ee6b61094"
012- string(32) "36922f486410d08209d0d0d21b26030e"
     int(0)
     -- Compression level 3 --
015+ string(32) "cfd4e29d07e72795f30e5edfa08758a9"
015- string(32) "a441a2f5169bb303cd45b860a5a9dbf9"
     int(0)
     -- Compression level 4 --
018+ string(32) "b392a9219fe07f6c1b7313fb4d9879a2"
018- string(32) "d5b7451e9de2864beccc9de1fc55eb87"
     int(0)
     -- Compression level 5 --
021+ string(32) "f361541b25cab55f0ce328a397489ff1"
021- string(32) "32ba4a01120449ec25508cabfad41f56"
     int(0)
     -- Compression level 6 --
024+ string(32) "368844871f7e9f35caded720e987aae1"
024- string(32) "764809aef15bb34cb73ad49ecb600d99"
     int(0)
     -- Compression level 7 --
027+ string(32) "d5cc5e2ebae8ed18726e984a03c0d412"
027- string(32) "e083e7e8d05471fed3c2182b9cd0d9eb"
     int(0)
     -- Compression level 8 --
030+ string(32) "d5cc5e2ebae8ed18726e984a03c0d412"
030- string(32) "e083e7e8d05471fed3c2182b9cd0d9eb"
     int(0)
     -- Compression level 9 --
033+ string(32) "d5cc5e2ebae8ed18726e984a03c0d412"
033- string(32) "e083e7e8d05471fed3c2182b9cd0d9eb"
     int(0)
     -- Compression level -1 --
     string(70) "789c735428ce4dccc951282e29cacc4b5728c95748cecf2d284a2d2ee6020087a509cb"
--
==> ext/zlib/tests/gzcompress_variation1.diff <==
     *** Testing gzcompress() : variation ***
     
     -- Testing multiple compression --
004+ string(32) "368844871f7e9f35caded720e987aae1"
005+ string(32) "6d165559a1145e5ee5e76d782ce638b4"
004- string(32) "764809aef15bb34cb73ad49ecb600d99"
005- string(32) "eba942bc2061f23ea8688cc5101872a4"
==> ext/zlib/tests/gzdeflate_basic1.diff <==
     *** Testing gzdeflate() : basic functionality ***
     -- Compression level -1 --
003+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
003- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 0 --
     string(32) "a71e54d2499aff9e48643cb1c260b60c"
     int(0)
     -- Compression level 1 --
009+ string(32) "e23c98777725df74016e8cf8c29c9e80"
009- string(32) "05e80f4dc0d422e1f333cbed555d381f"
     int(0)
     -- Compression level 2 --
012+ string(32) "ebae649d673c7eef91708af7839cfc79"
012- string(32) "0fb33656e4ed0750f977df83246fce7a"
     int(0)
     -- Compression level 3 --
015+ string(32) "14dbd3a919e3220a664d5ff9db72a120"
015- string(32) "bc6e9c1dccc3e951e006315ee669ee08"
     int(0)
     -- Compression level 4 --
018+ string(32) "0aea180cb867c7cd29b7f6d3dc6c685b"
018- string(32) "a61727d7a28c634470eb6e97a4a81b24"
     int(0)
     -- Compression level 5 --
021+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
021- string(32) "a2a1a14b7542c82e8943200d093d5f27"
     int(0)
     -- Compression level 6 --
024+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
024- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 7 --
027+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
027- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 8 --
030+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
030- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 9 --
033+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
033- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level -1 --
     string(58) "735428ce4dccc951282e29cacc4b5728c95748cecf2d284a2d2ee60200"
--
==> ext/zlib/tests/gzdeflate_variation1.diff <==
     *** Testing gzdeflate() : variation ***
     
     -- Testing multiple compression --
004+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
005+ string(32) "d5b61d22bdd52176c2e499e968a1ecda"
004- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
005- string(32) "86b9f895ef1377da5269ec3cb2729f71"
==> ext/zlib/tests/gzencode_basic1.diff <==
     *** Testing gzencode() : basic functionality ***
     -- Compression level -1 --
003+ string(32) "1e92d559b183b716ac3f7f363732dc37"
003- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 0 --
     string(32) "bbf32d5508e5f1f4e6d42790489dae15"
     -- Compression level 1 --
007+ string(32) "d4e95b84afc2e4e8e8100f052edf01df"
007- string(32) "0bfaaa7a5a57f8fb533074fca6c85eeb"
     -- Compression level 2 --
009+ string(32) "4e53e46b8306bef92284a0a082147627"
009- string(32) "7ddbfed63a76c42808722b66f1c133fc"
     -- Compression level 3 --
011+ string(32) "0f75ab4992c277a9c3f5ceb8f61b9784"
011- string(32) "ca2b85d194dfa2a4e8a162b646c99265"
     -- Compression level 4 --
013+ string(32) "5926f1626ef2932be04b3d5940408e83"
013- string(32) "cfe28033eaf260bc33ddc04b53d3ba39"
     -- Compression level 5 --
015+ string(32) "1e92d559b183b716ac3f7f363732dc37"
015- string(32) "ae357fada2b515422f8bea0aa3bcc48f"
     -- Compression level 6 --
017+ string(32) "1e92d559b183b716ac3f7f363732dc37"
017- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 7 --
019+ string(32) "1e92d559b183b716ac3f7f363732dc37"
019- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 8 --
021+ string(32) "1e92d559b183b716ac3f7f363732dc37"
021- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 9 --
023+ string(32) "887da8832a067faa8943be70cd1a67d7"
023- string(32) "0f220a09e9895bcb3a1308d2bc99cfdf"
     -- Compression level -1 --
     string(32) "f77bd31e1e4dd11d12828fb661a08010"
     -- Compression level 0 --
--
==> ext/zlib/tests/gzencode_variation1.diff <==
     *** Testing gzencode() : variation ***
     
     -- Testing multiple compression --
004+ string(3620) "1f8b080000000000000301fb0604f91f8b08000000000000036d57c16edc480ebdeb2b78eb8bd21f303e18de190ce205921dcc18f0999228554d978a0ac96a8df2f50b56c97690dd4300ab4552e47be423f3c23010b0406603f3871e2ca04154b040f0ad905ae4fcd0bd06b24002178b0a998744023157a335e6c99db5cc3349f71208fe4a312f0a98277812e15d8167e062820b7151f89dc54aa6ee3fe28e863702945501178c590d1094d07d4cb80c89b4ef9ef204c301bc6dac312f3d907f35d07a851786297ae60c9a88b687ee2bc3ca420f3583e1f078fea25ae0013bb977cd34108a7dc23150b5f57a2c70517fc868453081061e6fdabd383073220d0e4fa058936f88208c9cb5ac2b3a5cdd6f74e762e96898c21e355ca6ff97e8cbf9570f1bc918308fe46f27215caff074381d247469744819faee773e91473babe21926420bb0fb6fd55761c503465ea977eab2971cf04ea0a1cc73a209789ec1425407ca30c1c831f5dd97a2064bbc1314850d8bd2155e7ecc8074a3d11a162bde4861c4846bb4c3d35086c4798114676a99ee8161e792261808a5c6d843dc5a6fe8c8926b6f58f44c5fc285b74d4895e5a2b00b3bd1eeb309970956cc1775a4adac948ebe32b8a1b79a63107593f8fd3241e23b35bf84fb4561a284a775ccca891c66efc8798e23f5efcceb56249f446f6891b2c14a12ada6182e25ef2c168edab17a22eb4d1457a534c31a9760e0a07e2b91ac6885a87b8d16006140211878bac5fcf8032e33ca44492b3ebd37c422255bc367273428792201849d508e13da7f156b1de0693be353837f250b312f80b391b4ae6875973c451df94e42138c5cb2c901b3f0ea99a8e75524fbdc98e09d928fb790391c3d6ce5fbf744ad01f698521bc6c67e5110acca70f2ebc1624afad6718e6686b9cd02bba5b6cc77825be6bd4a0fcf8fdd4b28955b1d63e567626af8c1c83bca54392e0af89680b983e794d1bc6343a9a40a29a752c7f05941e3784bd1fbfd4202bb3351fb0913c1887a32cb6509d6a25236924da252fde0224ec1166d0c95929557cad628ade323b4a0d4f689026311a16c0a8e1ce0ee5de74193a3d2525d6b92387a82d7aeeb3efbe03a0608ffa61de8207d849f7e0c9827ed816541e7638a2b658dec7f774a59497bc079a61ad40943adaf1f60a6e9a368f58fcfcc530fa188b517ddfb9b9d70abee5a86bf69ac0be1fde51495b07e2810a64b55d50fd7956a623bca7a992a4e23f369f5113f3ab4adb1cbba924087ae9cbf06896a1133447d84e7190e2eb0491c6f50bc5af6567130864434bd5b74e6d4d24f3609cb123ea27054ce3f994c911ea1d2129b55d5996aa401537ab313ba535ea806db7d4111a478a3f6f173f709a9f5fed6e7c29f681d52333935faeaee8dc6f61d84eebde2be49b6af13ff57d698a21d8ff067fbf4e9fb01508bd0d570a7af86aa22eedf1670dd210339f41f8ef40fae5ba247780d470f9dbcc57769b8c79430e6a3666d846380957a786e35d13f34163b45321a740da3852178df0fc5de2c0732e7d79aca9a94b71e7fd6362a08132e8b8f618863806750f24c6716efa0a653deeac977a08f3cac47fde1117ef54d06895c8f614cc5c7d102d1b57b6e7bcd1f9cb596e7417686afbfabc594aedd93589df56637a3afbd7bf449e9c1c7280e895c8067a2544554eba676517ff42309dffc8762ddd35b315540da15d403c28c490946970d0fdcfd213c124d1eafcaadb5a3c33e9d9bce874430e6c7ee87840fb2de1b6866593d8d0dd3869eddd3096543d0e5f31926c1fddabd78622b4aa5e7a215a82ad87834bd7d861d15168e7979a8ddafa56ada4996cbda69630cbef8bb2f315315a4dafb2b4e2de2cc9c14f8521faaa2c329427ecf91975fd7a42bf5fb903cfc0f1f4d19d9a7e480217974a76e2ad3429c61e162558187e48ad5bdd68a3d3d9f4de5b371bcf0769e646e15d505f84bf7fc7ec4d600070c4563267dc32e660757a1ae1d63e7af157b85ee2bef6d5fd40ab377659a779634c157bf09c94b59fdaec0a9ef3ceb3d8e379ade6e2f1c8a529dadb18861cc97e93cf85c73c7300ace0623251a048db4fbc3d7d1671ad1bc12f631f603ba35b3cb34c96582b5c844d2774f09a5ac4d5debdc53b69829b59367e7343b5cbe7202efe9d2c465471b43df966615feea6984c9f1df70a46bdb6a2f28df4af4434bf01eb59e136a1227177f3b57b13b4fa471c9dd17be933665445802abb9ac700175a0bc8039cafa49c9c06fedd0779ffd527016d7c333d87c739cecd67571c08ee9d64337b3c0ecc62fe1803b899b732685cd61f3e6580fd89d7f1cb89c0bbcfe6fa2dd8ce4c84060110ff4367dedd67c7d9f202dd14e4ca25dfd851f3bcf60c187d8171ea47827fda57b65affd5c8b3ec4edf4a6fa23c3c87ee64a3dc5fd865657a785dfa5d331e34c0fad2b292588f91ecdcf1cba3654a23571faade411f3830bc0e98970cb94523b4e7d7f72d6364dc69ecb9db26b547d70b1fb2f117a4d3ddb0d000097d4e9e8fb060000"
004- string(3658) "1f8b0800000000000003010e07f1f81f8b08000000000000036d574d6fe4c80dbdeb57d4ad2f3dfe01eb83e1ec22980e309b4562c067b64449159754dafab0b6e7d7e73d96da1e4c72184c4b2ab2c8f7c847fa25baabba98dc1a8b2b7c38bb324b713ee37f757f56cdc5c7f5b17b9d152f923b157c5ae335e0b75fedd0e2d781c6b98ea3a6ee05affe1dfc3a6527f8f09c52dcb38ba38bb5249934d6ecfe1e53a9ab76ff4c342cf2a64ed2028349fc9a8b139755685352acb82b9fbb67f8bade5cdcb698e1fcec94b7ceba3cb897e806cfc8114350dd1ebbdfa35b62d2478b0056d23ed809b9b95d696d91ce2aa97c911e3fa539c43f84c887554a4d125c9e63ff96711cc08c0866263cb37a0bbe2122ae8f6baecb2284abfb4ddf916db8354cddeef37c1afe5fa02fc7afb3db34f5b3acbdf2eb905490d8f38d7468d253a323d5ebb903760d7944d3b2024e834a99ddce77669bdd823cfbb8e899d4ad4c799677452e6029e80023a03b2374005590641f7d3877df2ad09f3c0e82a54d6a5644fd63049a37ed4bc362016fd9f51264f1e5c630727421ae930b7ed416e93e47b7c71a400390361ffbecb7561bb98f69b5da289e91becc27f08b3b724cb8704f9144d366431d0cb870c56b205deaa2e17636063761a911039fb7e4bf9f06c4f0aecd2ec80e8b41831ca7515e31286166458ea3ef71f2ce7cde2ae269c96d60525724a9c9170b713ed5750758f3cd2a361fc8b288fc92358ce884692e8ea0fe59bd969a0da2eed5831b715749eaae7178f3ebd30fb88c92105f367cce2c882955dc6bf8eca0d5d57540b3092894743ba0fd5b2dad021836191f1afc0bba14dde1642cb0b1aa6879c38907dcefa0720082b801bec61417469219175267dfa047df35b0bd1332001c28cdfafd3bcabe91e74368cdd8d8478e494c190e7ee90c67f2bde288e68ab6b15e883c995be4f8feb6c6dda4278e4f38578ddbdc7be36788daf0c3cb1d1819c73822f7000a0d1813fa94153b572315e51343b536bc64977dff163cebfd8418773261f524017e251fccc60ae29a5770ae097594d52e9c1229d87ce967a36401c46b69945afb249d101c9d420ffa9a123e232c20e76467d5d169202a2dd4c582949e013e745df7958d4b0cc4fd4377a737cd4feea7974070000f314d423e0634cb9a618fdf5dc64fd422181fd59c9230c9f6f9d18dc8fc23e9cccbc7188733b04aa57de83ebea0be3633cff5fa1ff83269be7f44f5a8d84550cc703255fd345dd402034d0b3e11a73ec6e3d4a77f4f685b614329f1b3132ae7af33d02e1e55e291fa6574b758d1f0200e7423dbc852211818043a7c9ce80aa9d59fce0401959f5ea2cf71fde90824f8c9192dbe9d329db143794675ddcf257dd7755273b67340414e3ccad12e3f661f8aad9cf9957dc1275d10a51d3934fa81e68dc6768fb8ee23e373936c8e13feab8b0f50d227f7af76f561fb0950f3d099bbc316c3892a42fb36806d8660e800fa4f43fd4b962d2097d71933a54b77ff948677848eb17bb3a88b621682cfb3bbb49cf42fed6b3944124ad8358ca688aa44dd5f2144c7c9ab16f25b9aca9654ef357ec9ad55c40d324d6cc3d9e3920b863c231d31a95d937fb5520f9c816c79b7dcecc593fb9593cc05a51ebb1eeddd5b49eb437769738d0f64adc579d372b8b7f7c0208487ee3915ebf5766e148ebd77cf4e01f3ec285047011e55838968b6494d517fe29224777b24dd3ddf933101695b102e87db805eef291b74dcfd91628fb2a53f93dbd2968ef2e598746c9204f89fba1f0246fc671610a0591806e46a1346f77c40d910a47c5e20ffb23f003c04b648327a4ed98032c1965bd35bb0044f5344248f56fdb99aa61d6451d68e33489a83bffbe6573541b2da5f64681ea12090f778b2075374778810f73965fa3626a9d41f4df2f83f7c34658cec921b5a9bde49dd5007ec882b02adc514f81aa85898b5cc98e1b137733c0a8789b7f5648d2d231b80bf74978f25d61ce08a8abd11801fd8f995e066676307192ff7641f1cc6e0dee68565b8b22ac3889cd067bf732754a6b270af1044c6a8776811a4f6d8bd0477a9f516064201b920b92d7cd4dc7eee13e6b3eb3528a82f9abb3f388ebe6a8f871393461b73816ec54c99d604174bc5a6801de13908f86aea6a7d0fea107d682bcf1ec348b83872e6b8a316ecd02eb8f8dc86a609bf59a2dd03f1dfa4079436d55e24617be1a2854d008b2b2b1705e2078a7f3946318df1c24f6bf70d4b456eca286ec2b585b28262cc048a098c3e2d5f325a92bb36f691afdc14c822da1b116c9c1c07bb362eb0a04b78834c812134230ebf2044ac2e3c0e3ad00f848dc5010f3bf917ec2fc700b7bf26dacea8440620e04f90f4d97d6dd77cfde8a05c7d3930f1e5811fb8ec5c70964dcc8187ec90e32fdd6b64eec7586413b7d55bed65c4cce39a9b6c15e70e9da94e53fc904e6286f01f5b5562c94211befbc23507e01b2a3865e2f45b5d7b591f290087a5605b82495b4e393f31aa5b37211ec40241a746d903c5eebf117a4d3ddb0d00007b64cbc70e070000"
==> ext/zlib/tests/gzinflate-bug42663.diff <==
     int(168890)
002+ int(66409)
002- int(66743)
     int(65535)
     
     Warning: gzinflate(): data error in %s on line %d
--
==> ext/zlib/tests/zlib_filter_deflate2.diff <==
001+ ËA
001- ËA€ DÑ«Ì΍ñ£†1´MBâíUvñ_‚(ÆELÆõÌ/•aP¹=Pié;Ò6‰fÅCe4·U9;wˆ5ý±m/
002+ À DÑ«Ì®é=<FŠ£µ˜‚½}©»¿x?Có&ã…zá€WÈÎ0¨<h4†Œ„|,¢[õP™Ý
‹S®Á±®¿+о‡ó
==> ext/zlib/tests/zlib_filter_deflate.diff <==
001+ HctBCsAgDETRq8yuG+k9PEaKo7WYBIIIvX2pu794P0MU8yYW44V64YBXyM4wqDweaDSGjIR8LKJb9VCZ3Q2LjVOuwQSxrr8RK9C+h/MD
001- HctBDoAgDETRq8zOjfEeHKOGATG0TRpC4u1Vdn/xX4IoxkVMxgP1zA4vkJVhULk9UGkM6TvSNolmxUNlNLePVQ45O3eINf0fsQxtCxwv
 [2020-11-23 08:25 UTC] bjornar dot ness at gmail dot com
# tail -n+1 ext/zlib/tests/*.diff
==> ext/zlib/tests/bug71417.diff <==
--
     gzdecode(): 
     Warning: gzdecode(): data error in %s on line %d
     
010+ read: string(33) "The quick brown fox jumps over th"
010- read: string(32) "The quick brown fox jumps over t"
     gzdecode(): 
     Warning: gzdecode(): data error in %s on line %d
     
--
==> ext/zlib/tests/gzcompress_basic1.diff <==
     *** Testing gzcompress() : basic functionality ***
     -- Compression level -1 --
003+ string(32) "368844871f7e9f35caded720e987aae1"
003- string(32) "764809aef15bb34cb73ad49ecb600d99"
     int(0)
     -- Compression level 0 --
     string(32) "d0136b3fb5424142c0eb26dfec8f56fe"
     int(0)
     -- Compression level 1 --
009+ string(32) "3e53a912d68ec408127f21700496c2e9"
009- string(32) "c2e070f4320d1f674965eaab95b53d9c"
     int(0)
     -- Compression level 2 --
012+ string(32) "33670b7695f074cdf78adf5ee6b61094"
012- string(32) "36922f486410d08209d0d0d21b26030e"
     int(0)
     -- Compression level 3 --
015+ string(32) "cfd4e29d07e72795f30e5edfa08758a9"
015- string(32) "a441a2f5169bb303cd45b860a5a9dbf9"
     int(0)
     -- Compression level 4 --
018+ string(32) "b392a9219fe07f6c1b7313fb4d9879a2"
018- string(32) "d5b7451e9de2864beccc9de1fc55eb87"
     int(0)
     -- Compression level 5 --
021+ string(32) "f361541b25cab55f0ce328a397489ff1"
021- string(32) "32ba4a01120449ec25508cabfad41f56"
     int(0)
     -- Compression level 6 --
024+ string(32) "368844871f7e9f35caded720e987aae1"
024- string(32) "764809aef15bb34cb73ad49ecb600d99"
     int(0)
     -- Compression level 7 --
027+ string(32) "d5cc5e2ebae8ed18726e984a03c0d412"
027- string(32) "e083e7e8d05471fed3c2182b9cd0d9eb"
     int(0)
     -- Compression level 8 --
030+ string(32) "d5cc5e2ebae8ed18726e984a03c0d412"
030- string(32) "e083e7e8d05471fed3c2182b9cd0d9eb"
     int(0)
     -- Compression level 9 --
033+ string(32) "d5cc5e2ebae8ed18726e984a03c0d412"
033- string(32) "e083e7e8d05471fed3c2182b9cd0d9eb"
     int(0)
     -- Compression level -1 --
     string(70) "789c735428ce4dccc951282e29cacc4b5728c95748cecf2d284a2d2ee6020087a509cb"
--
==> ext/zlib/tests/gzcompress_variation1.diff <==
     *** Testing gzcompress() : variation ***
     
     -- Testing multiple compression --
004+ string(32) "368844871f7e9f35caded720e987aae1"
005+ string(32) "6d165559a1145e5ee5e76d782ce638b4"
004- string(32) "764809aef15bb34cb73ad49ecb600d99"
005- string(32) "eba942bc2061f23ea8688cc5101872a4"
==> ext/zlib/tests/gzdeflate_basic1.diff <==
     *** Testing gzdeflate() : basic functionality ***
     -- Compression level -1 --
003+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
003- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 0 --
     string(32) "a71e54d2499aff9e48643cb1c260b60c"
     int(0)
     -- Compression level 1 --
009+ string(32) "e23c98777725df74016e8cf8c29c9e80"
009- string(32) "05e80f4dc0d422e1f333cbed555d381f"
     int(0)
     -- Compression level 2 --
012+ string(32) "ebae649d673c7eef91708af7839cfc79"
012- string(32) "0fb33656e4ed0750f977df83246fce7a"
     int(0)
     -- Compression level 3 --
015+ string(32) "14dbd3a919e3220a664d5ff9db72a120"
015- string(32) "bc6e9c1dccc3e951e006315ee669ee08"
     int(0)
     -- Compression level 4 --
018+ string(32) "0aea180cb867c7cd29b7f6d3dc6c685b"
018- string(32) "a61727d7a28c634470eb6e97a4a81b24"
     int(0)
     -- Compression level 5 --
021+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
021- string(32) "a2a1a14b7542c82e8943200d093d5f27"
     int(0)
     -- Compression level 6 --
024+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
024- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 7 --
027+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
027- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 8 --
030+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
030- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level 9 --
033+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
033- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
     int(0)
     -- Compression level -1 --
     string(58) "735428ce4dccc951282e29cacc4b5728c95748cecf2d284a2d2ee60200"
--
==> ext/zlib/tests/gzdeflate_variation1.diff <==
     *** Testing gzdeflate() : variation ***
     
     -- Testing multiple compression --
004+ string(32) "24a0b92cfd5e8be9e6c22d6c1198e685"
005+ string(32) "d5b61d22bdd52176c2e499e968a1ecda"
004- string(32) "078554fe65e06f6ff01eab51cfc7ae9b"
005- string(32) "86b9f895ef1377da5269ec3cb2729f71"
==> ext/zlib/tests/gzencode_basic1.diff <==
     *** Testing gzencode() : basic functionality ***
     -- Compression level -1 --
003+ string(32) "1e92d559b183b716ac3f7f363732dc37"
003- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 0 --
     string(32) "bbf32d5508e5f1f4e6d42790489dae15"
     -- Compression level 1 --
007+ string(32) "d4e95b84afc2e4e8e8100f052edf01df"
007- string(32) "0bfaaa7a5a57f8fb533074fca6c85eeb"
     -- Compression level 2 --
009+ string(32) "4e53e46b8306bef92284a0a082147627"
009- string(32) "7ddbfed63a76c42808722b66f1c133fc"
     -- Compression level 3 --
011+ string(32) "0f75ab4992c277a9c3f5ceb8f61b9784"
011- string(32) "ca2b85d194dfa2a4e8a162b646c99265"
     -- Compression level 4 --
013+ string(32) "5926f1626ef2932be04b3d5940408e83"
013- string(32) "cfe28033eaf260bc33ddc04b53d3ba39"
     -- Compression level 5 --
015+ string(32) "1e92d559b183b716ac3f7f363732dc37"
015- string(32) "ae357fada2b515422f8bea0aa3bcc48f"
     -- Compression level 6 --
017+ string(32) "1e92d559b183b716ac3f7f363732dc37"
017- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 7 --
019+ string(32) "1e92d559b183b716ac3f7f363732dc37"
019- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 8 --
021+ string(32) "1e92d559b183b716ac3f7f363732dc37"
021- string(32) "d9ede02415ce91d21e5a94274e2b9c42"
     -- Compression level 9 --
023+ string(32) "887da8832a067faa8943be70cd1a67d7"
023- string(32) "0f220a09e9895bcb3a1308d2bc99cfdf"
     -- Compression level -1 --
     string(32) "f77bd31e1e4dd11d12828fb661a08010"
     -- Compression level 0 --
--
==> ext/zlib/tests/gzencode_variation1.diff <==
     *** Testing gzencode() : variation ***
     
     -- Testing multiple compression --
004+ string(3620) "1f8b080000000000000301fb0604f91f8b08000000000000036d57c16edc480ebdeb2b78eb8bd21f303e18de190ce205921dcc18f0999228554d978a0ac96a8df2f50b56c97690dd4300ab4552e47be423f3c23010b0406603f3871e2ca04154b040f0ad905ae4fcd0bd06b24002178b0a998744023157a335e6c99db5cc3349f71208fe4a312f0a98277812e15d8167e062820b7151f89dc54aa6ee3fe28e863702945501178c590d1094d07d4cb80c89b4ef9ef204c301bc6dac312f3d907f35d07a851786297ae60c9a88b687ee2bc3ca420f3583e1f078fea25ae0013bb977cd34108a7dc23150b5f57a2c70517fc868453081061e6fdabd383073220d0e4fa058936f88208c9cb5ac2b3a5cdd6f74e762e96898c21e355ca6ff97e8cbf9570f1bc918308fe46f27215caff074381d247469744819faee773e91473babe21926420bb0fb6fd55761c503465ea977eab2971cf04ea0a1cc73a209789ec1425407ca30c1c831f5dd97a2064bbc1314850d8bd2155e7ecc8074a3d11a162bde4861c4846bb4c3d35086c4798114676a99ee8161e792261808a5c6d843dc5a6fe8c8926b6f58f44c5fc285b74d4895e5a2b00b3bd1eeb309970956cc1775a4adac948ebe32b8a1b79a63107593f8fd3241e23b35bf84fb4561a284a775ccca891c66efc8798e23f5efcceb56249f446f6891b2c14a12ada6182e25ef2c168edab17a22eb4d1457a534c31a9760e0a07e2b91ac6885a87b8d16006140211878bac5fcf8032e33ca44492b3ebd37c422255bc367273428792201849d508e13da7f156b1de0693be353837f250b312f80b391b4ae6875973c451df94e42138c5cb2c901b3f0ea99a8e75524fbdc98e09d928fb790391c3d6ce5fbf744ad01f698521bc6c67e5110acca70f2ebc1624afad6718e6686b9cd02bba5b6cc77825be6bd4a0fcf8fdd4b28955b1d63e567626af8c1c83bca54392e0af89680b983e794d1bc6343a9a40a29a752c7f05941e3784bd1fbfd4202bb3351fb0913c1887a32cb6509d6a25236924da252fde0224ec1166d0c95929557cad628ade323b4a0d4f689026311a16c0a8e1ce0ee5de74193a3d2525d6b92387a82d7aeeb3efbe03a0608ffa61de8207d849f7e0c9827ed816541e7638a2b658dec7f774a59497bc079a61ad40943adaf1f60a6e9a368f58fcfcc530fa188b517ddfb9b9d70abee5a86bf69ac0be1fde51495b07e2810a64b55d50fd7956a623bca7a992a4e23f369f5113f3ab4adb1cbba924087ae9cbf06896a1133447d84e7190e2eb0491c6f50bc5af6567130864434bd5b74e6d4d24f3609cb123ea27054ce3f994c911ea1d2129b55d5996aa401537ab313ba535ea806db7d4111a478a3f6f173f709a9f5fed6e7c29f681d52333935faeaee8dc6f61d84eebde2be49b6af13ff57d698a21d8ff067fbf4e9fb01508bd0d570a7af86aa22eedf1670dd210339f41f8ef40fae5ba247780d470f9dbcc57769b8c79430e6a3666d846380957a786e35d13f34163b45321a740da3852178df0fc5de2c0732e7d79aca9a94b71e7fd6362a08132e8b8f618863806750f24c6716efa0a653deeac977a08f3cac47fde1117ef54d06895c8f614cc5c7d102d1b57b6e7bcd1f9cb596e7417686afbfabc594aedd93589df56637a3afbd7bf449e9c1c7280e895c8067a2544554eba676517ff42309dffc8762ddd35b315540da15d403c28c490946970d0fdcfd213c124d1eafcaadb5a3c33e9d9bce874430e6c7ee87840fb2de1b6866593d8d0dd3869eddd3096543d0e5f31926c1fddabd78622b4aa5e7a215a82ad87834bd7d861d15168e7979a8ddafa56ada4996cbda69630cbef8bb2f315315a4dafb2b4e2de2cc9c14f8521faaa2c329427ecf91975fd7a42bf5fb903cfc0f1f4d19d9a7e480217974a76e2ad3429c61e162558187e48ad5bdd68a3d3d9f4de5b371bcf0769e646e15d505f84bf7fc7ec4d600070c4563267dc32e660757a1ae1d63e7af157b85ee2bef6d5fd40ab377659a779634c157bf09c94b59fdaec0a9ef3ceb3d8e379ade6e2f1c8a529dadb18861cc97e93cf85c73c7300ace0623251a048db4fbc3d7d1671ad1bc12f631f603ba35b3cb34c96582b5c844d2774f09a5ac4d5debdc53b69829b59367e7343b5cbe7202efe9d2c465471b43df966615feea6984c9f1df70a46bdb6a2f28df4af4434bf01eb59e136a1227177f3b57b13b4fa471c9dd17be933665445802abb9ac700175a0bc8039cafa49c9c06fedd0779ffd527016d7c333d87c739cecd67571c08ee9d64337b3c0ecc62fe1803b899b732685cd61f3e6580fd89d7f1cb89c0bbcfe6fa2dd8ce4c84060110ff4367dedd67c7d9f202dd14e4ca25dfd851f3bcf60c187d8171ea47827fda57b65affd5c8b3ec4edf4a6fa23c3c87ee64a3dc5fd865657a785dfa5d331e34c0fad2b292588f91ecdcf1cba3654a23571faade411f3830bc0e98970cb94523b4e7d7f72d6364dc69ecb9db26b547d70b1fb2f117a4d3ddb0d000097d4e9e8fb060000"
004- string(3658) "1f8b0800000000000003010e07f1f81f8b08000000000000036d574d6fe4c80dbdeb57d4ad2f3dfe01eb83e1ec22980e309b4562c067b64449159754dafab0b6e7d7e73d96da1e4c72184c4b2ab2c8f7c847fa25baabba98dc1a8b2b7c38bb324b713ee37f757f56cdc5c7f5b17b9d152f923b157c5ae335e0b75fedd0e2d781c6b98ea3a6ee05affe1dfc3a6527f8f09c52dcb38ba38bb5249934d6ecfe1e53a9ab76ff4c342cf2a64ed2028349fc9a8b139755685352acb82b9fbb67f8bade5cdcb698e1fcec94b7ceba3cb897e806cfc8114350dd1ebbdfa35b62d2478b0056d23ed809b9b95d696d91ce2aa97c911e3fa539c43f84c887554a4d125c9e63ff96711cc08c0866263cb37a0bbe2122ae8f6baecb2284abfb4ddf916db8354cddeef37c1afe5fa02fc7afb3db34f5b3acbdf2eb905490d8f38d7468d253a323d5ebb903760d7944d3b2024e834a99ddce77669bdd823cfbb8e899d4ad4c799677452e6029e80023a03b2374005590641f7d3877df2ad09f3c0e82a54d6a5644fd63049a37ed4bc362016fd9f51264f1e5c630727421ae930b7ed416e93e47b7c71a400390361ffbecb7561bb98f69b5da289e91becc27f08b3b724cb8704f9144d366431d0cb870c56b205deaa2e17636063761a911039fb7e4bf9f06c4f0aecd2ec80e8b41831ca7515e31286166458ea3ef71f2ce7cde2ae269c96d60525724a9c9170b713ed5750758f3cd2a361fc8b288fc92358ce884692e8ea0fe59bd969a0da2eed5831b715749eaae7178f3ebd30fb88c92105f367cce2c882955dc6bf8eca0d5d57540b3092894743ba0fd5b2dad021836191f1afc0bba14dde1642cb0b1aa6879c38907dcefa0720082b801bec61417469219175267dfa047df35b0bd1332001c28cdfafd3bcabe91e74368cdd8d8478e494c190e7ee90c67f2bde288e68ab6b15e883c995be4f8feb6c6dda4278e4f38578ddbdc7be36788daf0c3cb1d1819c73822f7000a0d1813fa94153b572315e51343b536bc64977dff163cebfd8418773261f524017e251fccc60ae29a5770ae097594d52e9c1229d87ce967a36401c46b69945afb249d101c9d420ffa9a123e232c20e76467d5d169202a2dd4c582949e013e745df7958d4b0cc4fd4377a737cd4feea7974070000f314d423e0634cb9a618fdf5dc64fd422181fd59c9230c9f6f9d18dc8fc23e9cccbc7188733b04aa57de83ebea0be3633cff5fa1ff83269be7f44f5a8d84550cc703255fd345dd402034d0b3e11a73ec6e3d4a77f4f685b614329f1b3132ae7af33d02e1e55e291fa6574b758d1f0200e7423dbc852211818043a7c9ce80aa9d59fce0401959f5ea2cf71fde90824f8c9192dbe9d329db143794675ddcf257dd7755273b67340414e3ccad12e3f661f8aad9cf9957dc1275d10a51d3934fa81e68dc6768fb8ee23e373936c8e13feab8b0f50d227f7af76f561fb0950f3d099bbc316c3892a42fb36806d8660e800fa4f43fd4b962d2097d71933a54b77ff948677848eb17bb3a88b621682cfb3bbb49cf42fed6b3944124ad8358ca688aa44dd5f2144c7c9ab16f25b9aca9654ef357ec9ad55c40d324d6cc3d9e3920b863c231d31a95d937fb5520f9c816c79b7dcecc593fb9593cc05a51ebb1eeddd5b49eb437769738d0f64adc579d372b8b7f7c0208487ee3915ebf5766e148ebd77cf4e01f3ec285047011e55838968b6494d517fe29224777b24dd3ddf933101695b102e87db805eef291b74dcfd91628fb2a53f93dbd2968ef2e598746c9204f89fba1f0246fc671610a0591806e46a1346f77c40d910a47c5e20ffb23f003c04b648327a4ed98032c1965bd35bb0044f5344248f56fdb99aa61d6451d68e33489a83bffbe6573541b2da5f64681ea12090f778b2075374778810f73965fa3626a9d41f4df2f83f7c34658cec921b5a9bde49dd5007ec882b02adc514f81aa85898b5cc98e1b137733c0a8789b7f5648d2d231b80bf74978f25d61ce08a8abd11801fd8f995e066676307192ff7641f1cc6e0dee68565b8b22ac3889cd067bf732754a6b270af1044c6a8776811a4f6d8bd0477a9f516064201b920b92d7cd4dc7eee13e6b3eb3528a82f9abb3f388ebe6a8f871393461b73816ec54c99d604174bc5a6801de13908f86aea6a7d0fea107d682bcf1ec348b83872e6b8a316ecd02eb8f8dc86a609bf59a2dd03f1dfa4079436d55e24617be1a2854d008b2b2b1705e2078a7f3946318df1c24f6bf70d4b456eca286ec2b585b28262cc048a098c3e2d5f325a92bb36f691afdc14c822da1b116c9c1c07bb362eb0a04b78834c812134230ebf2044ac2e3c0e3ad00f848dc5010f3bf917ec2fc700b7bf26dacea8440620e04f90f4d97d6dd77cfde8a05c7d3930f1e5811fb8ec5c70964dcc8187ec90e32fdd6b64eec7586413b7d55bed65c4cce39a9b6c15e70e9da94e53fc904e6286f01f5b5562c94211befbc23507e01b2a3865e2f45b5d7b591f290087a5605b82495b4e393f31aa5b37211ec40241a746d903c5eebf117a4d3ddb0d00007b64cbc70e070000"
==> ext/zlib/tests/gzinflate-bug42663.diff <==
     int(168890)
002+ int(66409)
002- int(66743)
     int(65535)
     
     Warning: gzinflate(): data error in %s on line %d
--
==> ext/zlib/tests/zlib_filter_deflate2.diff <==
001+ ËA
001- ËA€ DÑ«Ì΍ñ£†1´MBâíUvñ_‚(ÆELÆõÌ/•aP¹=Pié;Ò6‰fÅCe4·U9;wˆ5ý±m/
002+ À DÑ«Ì®é=<FŠ£µ˜‚½}©»¿x?Có&ã…zá€WÈÎ0¨<h4†Œ„|,¢[õP™Ý
‹S®Á±®¿+о‡ó
==> ext/zlib/tests/zlib_filter_deflate.diff <==
001+ HctBCsAgDETRq8yuG+k9PEaKo7WYBIIIvX2pu794P0MU8yYW44V64YBXyM4wqDweaDSGjIR8LKJb9VCZ3Q2LjVOuwQSxrr8RK9C+h/MD
001- HctBDoAgDETRq8zOjfEeHKOGATG0TRpC4u1Vdn/xX4IoxkVMxgP1zA4vkJVhULk9UGkM6TvSNolmxUNlNLePVQ45O3eINf0fsQxtCxwv
 [2020-11-24 13:59 UTC] nikic@php.net
Not really obvious to me where the difference is coming from. As far as I understand cloudflare/zlib is supposed to be a faster drop-in replacement, but shouldn't produce different results.
 [2020-11-24 14:21 UTC] nikic@php.net
At least I can confirm the same test failures when linking against cloudflare/zlib. But I don't really have the context to address this. I don't want to simply adjust the tests, because this looks like a legitimate issue with either cloudflare/zlib or our usage of it (maybe we need to be more explicit about options we pass because it has different defaults?) Really hard to say given that there seems to be zero documentation for cloudflare/zlib and how it differs from upstream zlib.
 [2020-11-26 01:34 UTC] bjornar dot ness at gmail dot com
I think one can not expect different implementations of zlib to have the exact
same binary output. For example cloudflare commit mentions eg that level 1 compression ratio _might_ be worse than default, but faster. That means output
is not consistent between impl.

Perhaps the tests could be written to take this into account.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 12:01:29 2024 UTC