From 81d95c4c3ca4828943bd8169a9b7760b4e54ec98 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 7 Oct 2019 12:40:21 +0200 Subject: Don't test default serialize max_depth The default depth is large enough to cause stack overflows in msan builds, though apparently only on old clang versions. Avoiding a stack overflow there requires making the depth *much* smaller, less than 1000. As I don't think that's reasonable for all the other setups where 4k works fine, I'm just dropping this part of the test. --- ext/standard/tests/serialize/max_depth.phpt | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'ext/standard') diff --git a/ext/standard/tests/serialize/max_depth.phpt b/ext/standard/tests/serialize/max_depth.phpt index 4f605d284e..f20d9a7ccd 100644 --- a/ext/standard/tests/serialize/max_depth.phpt +++ b/ext/standard/tests/serialize/max_depth.phpt @@ -31,11 +31,6 @@ var_dump(unserialize( ['max_depth' => 128] )); -// Default depth is 4096 -echo "Default depth:\n"; -var_dump(unserialize(create_nested_data(4096, 'a:1:{i:0;', '}')) !== false); -var_dump(unserialize(create_nested_data(4097, 'a:1:{i:0;', '}'))); - // Depth can also be adjusted using ini setting echo "Ini setting:\n"; ini_set("unserialize_max_depth", 128); @@ -120,13 +115,6 @@ Warning: unserialize(): Maximum depth of 128 exceeded. The depth limit can be ch Notice: unserialize(): Error at offset 2834 of 2971 bytes in %s on line %d bool(false) -Default depth: -bool(true) - -Warning: unserialize(): Maximum depth of 4096 exceeded. The depth limit can be changed using the max_depth unserialize() option or the unserialize_max_depth ini setting in %s on line %d - -Notice: unserialize(): Error at offset 36869 of 40974 bytes in %s on line %d -bool(false) Ini setting: bool(true) -- cgit v1.2.1