10000 Fix insufficiently-portable regression test case. · home201448/postgres@57b0282 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57b0282

Browse files
committed
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
1 parent 921c18c commit 57b0282

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/test/regress/expected/json.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ DETAIL: Expected string, but found "3".
233233
CONTEXT: JSON data, line 1: {"abc":1,3...
234234
-- Recursion.
235235
SET max_stack_depth = '100kB';
236-
SELECT repeat('[', 1000)::json;
236+
SELECT repeat('[', 10000)::json;
237237
ERROR: stack depth limit exceeded
238238
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
239-
SELECT repeat('{"a":', 1000)::json;
239+
SELECT repeat('{"a":', 10000)::json;
240240
ERROR: stack depth limit exceeded
241241
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
242242
RESET max_stack_depth;

src/test/regress/expected/json_1.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ DETAIL: Expected string, but found "3".
233233
CONTEXT: JSON data, line 1: {"abc":1,3...
234234
-- Recursion.
235235
SET max_stack_depth = '100kB';
236-
SELECT repeat('[', 1000)::json;
236+
SELECT repeat('[', 10000)::json;
237237
ERROR: stack depth limit exceeded
238238
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
239-
SELECT repeat('{"a":', 1000)::json;
239+
SELECT repeat('{"a":', 10000)::json;
240240
ERROR: stack depth limit exceeded
241241
HINT: Increase the configuration parameter "max_stack_depth" (currently 100kB), after ensuring the platform's stack depth limit is adequate.
242242
RESET max_stack_depth;

src/test/regress/sql/json.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ SELECT '{"abc":1,3}'::json; -- ERROR, no value
4747

4848
-- Recursion.
4949
SET max_stack_depth = '100kB';
50-
SELECT repeat('[', 1000)::json;
51-
SELECT repeat('{"a":', 1000)::json;
50+
SELECT repeat('[', 10000)::json;
51+
SELECT repeat('{"a":', 10000)::json;
5252
RESET max_stack_depth;
5353

5454
-- Miscellaneous stuff.

0 commit comments

Comments
 (0)
0