aboutsummaryrefslogtreecommitdiff
path: root/tests/pending
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-01-17 17:14:11 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-01-17 17:25:28 +0100
commit06c7513dabb9ce24380787da3cc1ae274f873c94 (patch)
treef7eca88f95693e72de57039707b0a705b6e33a6c /tests/pending
parent0e32220e64bab05b32c830675fcfc91c0a9235d3 (diff)
downloaddotty-06c7513dabb9ce24380787da3cc1ae274f873c94.tar.gz
dotty-06c7513dabb9ce24380787da3cc1ae274f873c94.tar.bz2
dotty-06c7513dabb9ce24380787da3cc1ae274f873c94.zip
Stop crashes because we're out of memory by disabling t7880
All of our recent memory-related tests failures since https://github.com/lampepfl/dotty/pull/1030 was merged seem to be caused by t7880.scala. It tries to intentionally trigger an OutOfMemoryError, however since we don't pass -Xmx to our run tests it's possible that this we fill up the memory of our host before we reach the maximum heap size of the JVM. Ideally, we would specify a -Xmx for run tests (scalac uses 1 GB), unfortunately in the version of partest we use this is tricky because we need to set the system property "partest.java_opts". If we upgrade our partest to the latest release, we can instead specify it by setting the argument `javaOpts` of the constructor of `SuiteRunner`, see https://github.com/scala/scala-partest/commit/7c4659e1f88b410109ad3c4e7f66ae7070c6e985
Diffstat (limited to 'tests/pending')
-rw-r--r--tests/pending/run/t7880.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pending/run/t7880.scala b/tests/pending/run/t7880.scala
new file mode 100644
index 000000000..7e57a3421
--- /dev/null
+++ b/tests/pending/run/t7880.scala
@@ -0,0 +1,8 @@
+// Do "git log" on this file to know why it's been moved to pending
+object Test extends dotty.runtime.LegacyApp {
+ // This should terminate in one way or another, but it shouldn't loop forever.
+ try {
+ val buffer = collection.mutable.ArrayBuffer.fill(Int.MaxValue / 2 + 1)(0)
+ buffer append 1
+ } catch { case _: OutOfMemoryError => }
+}