From 06c7513dabb9ce24380787da3cc1ae274f873c94 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 17 Jan 2016 17:14:11 +0100 Subject: 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 --- tests/pending/run/t7880.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/pending/run/t7880.scala (limited to 'tests/pending') 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 => } +} -- cgit v1.2.3