git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 272ede7)
Fix insufficiently-portable regression test case.
Mon, 5 Oct 2015 16:19:14 +0000 (12:19 -0400)
Mon, 5 Oct 2015 16:19:14 +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


diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out
index cb9a0a1eb3082f3b6114e6b77d27d7ef8121e314..5d33de00b1e681ab179f86b08a4cf9057a9ded2f 100644 (file)
--- 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 fe63a72b39c81ff6895bbcc1ed67110f9336a46f..a6e092cb8e0d2a95139109aabb59c571f1da314f 100644 (file)
--- 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 148364d74bf2ba20e10733c01cf549fe75f38cbd..c4e87707bd76327e7818a64bbd92f418baee683f 100644 (file)
--- 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 903dbd4c402e4b20afd860c510d46d3ddfba6b98..deb87dd2a663ba12c244c6c0c5c054659f8b604b 100644 (file)
--- 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 a173f06d958e1e9556e5c0997f589ff7a589343c..da1ecbed4c42734984d29d0ed1bf62cc04396a21 100644 (file)
--- 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 f86b7fbf9bf1d6e4da42e9a0efbbe59670a4e442..25b5504face6a7c8019c05db1197cf49325011cf 100644 (file)
--- 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.
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /