Fix insufficiently-portable regression test case.
authorTom Lane
Mon, 5 Oct 2015 16:19:15 +0000 (12:19 -0400)
committerTom Lane
Mon, 5 Oct 2015 16:19:15 +0000 (12:19 -0400)
Some of the buildfarm members are evidently miserly enough of stack space
to pass the originally-committed form of this test.  Increase the
requirement 10X to hopefully ensure that it fails as-expected everywhere.

Security: CVE-2015-5289

src/test/regress/expected/json.out
src/test/regress/expected/json_1.out
src/test/regress/expected/jsonb.out
src/test/regress/expected/jsonb_1.out
src/test/regress/sql/json.sql
src/test/regress/sql/jsonb.sql

index 8bd0fb196924e378073cdc6e544de024c17c02af..3954bc713f99b34622e7c5871b162327a4431c19 100644 (file)
@@ -233,10 +233,10 @@ DETAIL:  Expected string, but found "3".
 CONTEXT:  JSON data, line 1: {"abc":1,3...
 -- Recursion.
 SET max_stack_depth = '100kB';
-SELECT repeat('[', 1000)::json;
+SELECT repeat('[', 10000)::json;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
-SELECT repeat('{"a":', 1000)::json;
+SELECT repeat('{"a":', 10000)::json;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
 RESET max_stack_depth;
index e103f1e82331f74b8f414bcf61854d09feb1c23c..d17fef4e32edd4c9d642544e3635ae75cf14c90e 100644 (file)
@@ -233,10 +233,10 @@ DETAIL:  Expected string, but found "3".
 CONTEXT:  JSON data, line 1: {"abc":1,3...
 -- Recursion.
 SET max_stack_depth = '100kB';
-SELECT repeat('[', 1000)::json;
+SELECT repeat('[', 10000)::json;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
-SELECT repeat('{"a":', 1000)::json;
+SELECT repeat('{"a":', 10000)::json;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
 RESET max_stack_depth;
index e4b782270d0d1978998f635ac0efa3d6df3859e1..f72f219be5559e2e199a5046dd5e9d43952c7a4d 100644 (file)
@@ -241,10 +241,10 @@ DETAIL:  Expected string, but found "3".
 CONTEXT:  JSON data, line 1: {"abc":1,3...
 -- Recursion.
 SET max_stack_depth = '100kB';
-SELECT repeat('[', 1000)::jsonb;
+SELECT repeat('[', 10000)::jsonb;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
-SELECT repeat('{"a":', 1000)::jsonb;
+SELECT repeat('{"a":', 10000)::jsonb;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
 RESET max_stack_depth;
index 7c10d76478bb8e76a3cf08397f2aace9aee818a8..04681f2d6db970c8d228691a737ee28e224d7778 100644 (file)
@@ -241,10 +241,10 @@ DETAIL:  Expected string, but found "3".
 CONTEXT:  JSON data, line 1: {"abc":1,3...
 -- Recursion.
 SET max_stack_depth = '100kB';
-SELECT repeat('[', 1000)::jsonb;
+SELECT repeat('[', 10000)::jsonb;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
-SELECT repeat('{"a":', 1000)::jsonb;
+SELECT repeat('{"a":', 10000)::jsonb;
 ERROR:  stack depth limit exceeded
 HINT:  Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
 RESET max_stack_depth;
index ad8f7fe0cc9da49aac5dee1f65407cd1ac38e53b..0dc77841be1016d149e7f89996d3c0bb4f21eaa5 100644 (file)
@@ -47,8 +47,8 @@ SELECT '{"abc":1,3}'::json;       -- ERROR, no value
 
 -- Recursion.
 SET max_stack_depth = '100kB';
-SELECT repeat('[', 1000)::json;
-SELECT repeat('{"a":', 1000)::json;
+SELECT repeat('[', 10000)::json;
+SELECT repeat('{"a":', 10000)::json;
 RESET max_stack_depth;
 
 -- Miscellaneous stuff.
index ecd3f6913d704a97dc886c2edc1339332c4d6ea5..c9b05b348ba6b83a6d103ce021180e8b23124dc2 100644 (file)
@@ -50,8 +50,8 @@ SELECT '{"abc":1,3}'::jsonb;      -- ERROR, no value
 
 -- Recursion.
 SET max_stack_depth = '100kB';
-SELECT repeat('[', 1000)::jsonb;
-SELECT repeat('{"a":', 1000)::jsonb;
+SELECT repeat('[', 10000)::jsonb;
+SELECT repeat('{"a":', 10000)::jsonb;
 RESET max_stack_depth;
 
 -- Miscellaneous stuff.