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/sql/json.sql

index a43c9e01bef66dc672f20a15dea8a2ca898ff1df..2a82aef6ba92d7475a66bf03688bd48c1e73ed5f 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 075c3f0e0faa9b7f6bc2384afdf8d32ef43e8dd9..e43118360add8a46410580a537c6bd2a26e8baba 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 f1f898418dd33f54d4ba5332a4d04141958902bd..73993adcfefc99b4495cff21bdae8cf03863341e 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.