aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-10-05 12:19:15 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-10-05 12:19:15 -0400
commit868b79adb460dfb702a83eb502e08abde458cc98 (patch)
treee0ad1ec1f3f02758d85e14837d2df08f262c55a2
parent5d250a80c0f4b67df6bd2ebd517536b6c4875911 (diff)
downloadpostgresql-868b79adb460dfb702a83eb502e08abde458cc98.tar.gz
postgresql-868b79adb460dfb702a83eb502e08abde458cc98.zip
Fix insufficiently-portable regression test case.
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
-rw-r--r--src/test/regress/expected/json.out4
-rw-r--r--src/test/regress/expected/json_1.out4
-rw-r--r--src/test/regress/expected/jsonb.out4
-rw-r--r--src/test/regress/expected/jsonb_1.out4
-rw-r--r--src/test/regress/sql/json.sql4
-rw-r--r--src/test/regress/sql/jsonb.sql4
6 files changed, 12 insertions, 12 deletions
diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out
index 8bd0fb19692..3954bc713f9 100644
--- a/src/test/regress/expected/json.out
+++ b/src/test/regress/expected/json.out
@@ -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;
diff --git a/src/test/regress/expected/json_1.out b/src/test/regress/expected/json_1.out
index e103f1e8233..d17fef4e32e 100644
--- a/src/test/regress/expected/json_1.out
+++ b/src/test/regress/expected/json_1.out
@@ -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;
diff --git a/src/test/regress/expected/jsonb.out b/src/test/regress/expected/jsonb.out
index e4b782270d0..f72f219be55 100644
--- a/src/test/regress/expected/jsonb.out
+++ b/src/test/regress/expected/jsonb.out
@@ -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;
diff --git a/src/test/regress/expected/jsonb_1.out b/src/test/regress/expected/jsonb_1.out
index 7c10d76478b..04681f2d6db 100644
--- a/src/test/regress/expected/jsonb_1.out
+++ b/src/test/regress/expected/jsonb_1.out
@@ -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;
diff --git a/src/test/regress/sql/json.sql b/src/test/regress/sql/json.sql
index ad8f7fe0cc9..0dc77841be1 100644
--- a/src/test/regress/sql/json.sql
+++ b/src/test/regress/sql/json.sql
@@ -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.
diff --git a/src/test/regress/sql/jsonb.sql b/src/test/regress/sql/jsonb.sql
index ecd3f6913d7..c9b05b348ba 100644
--- a/src/test/regress/sql/jsonb.sql
+++ b/src/test/regress/sql/jsonb.sql
@@ -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.