diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-07 12:40:21 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-07 12:43:12 +0200 |
commit | 81d95c4c3ca4828943bd8169a9b7760b4e54ec98 (patch) | |
tree | 166351ff681622edaa2d16f4a8016b1eda952ca2 /ext/standard | |
parent | 53077217e2801f65dd3cb598f12aee2fa792742a (diff) | |
download | php-git-81d95c4c3ca4828943bd8169a9b7760b4e54ec98.tar.gz |
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.
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/tests/serialize/max_depth.phpt | 12 |
1 files changed, 0 insertions, 12 deletions
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) |