summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts
diff options
context:
space:
mode:
authorBenjamin Maurer <maurer.benjamin@gmail.com>2020-09-14 13:12:50 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-29 00:33:20 -0400
commit74c797f6b72c4d01f5e0092dfac1461f3f3dd7a2 (patch)
treeed898941ecef67266b74798c7808eb9c912488c5 /testsuite/tests/rts
parentb9635d0a9bbb7f659c376b68cdc87223c864243c (diff)
downloadhaskell-74c797f6b72c4d01f5e0092dfac1461f3f3dd7a2.tar.gz
Workaround for #18623: GHC crashes bc. under rlimit for vmem it will reserve
_all_ of it, leaving nothing for, e.g., thread stacks. Fix will only allocate 2/3rds and check whether remainder is at least large enough for minimum amount of thread stacks.
Diffstat (limited to 'testsuite/tests/rts')
-rw-r--r--testsuite/tests/rts/T18623/all.T6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/rts/T18623/all.T b/testsuite/tests/rts/T18623/all.T
new file mode 100644
index 0000000000..c6176f1eac
--- /dev/null
+++ b/testsuite/tests/rts/T18623/all.T
@@ -0,0 +1,6 @@
+# Starting GHC on *nix with vmem limit, RTS will reserve all available memory
+# and crash when creating a thread. Fix reserves only 2/3rds of vmem_limit.
+test('T18623',
+ [when(opsys('mingw32'), skip), cmd_prefix('ulimit -v ' + str(1024 ** 2) + ' && '), ignore_stdout],
+ run_command,
+ ['{compiler} --version']) \ No newline at end of file