summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-01-03 02:35:08 -0800
committerJason Zaugg <jzaugg@gmail.com>2014-01-03 02:35:08 -0800
commit66a12fc264cae53107fda4feb5e42fda6879c1ae (patch)
tree756db8baa6be5aa45b32d2bec6882e7221b9e927 /test/files/run
parent30e0bcf5f3158d532ebf874e2e38393cae34658c (diff)
parentd2ee92f05561d2f58f6353856ccbf6467f9b23d9 (diff)
downloadscala-66a12fc264cae53107fda4feb5e42fda6879c1ae.tar.gz
scala-66a12fc264cae53107fda4feb5e42fda6879c1ae.tar.bz2
scala-66a12fc264cae53107fda4feb5e42fda6879c1ae.zip
Merge pull request #3284 from soc/SI-7880
SI-7880 Fix infinite loop in ResizableArray#ensureSize
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t7880.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/t7880.scala b/test/files/run/t7880.scala
new file mode 100644
index 0000000000..9fbc337f87
--- /dev/null
+++ b/test/files/run/t7880.scala
@@ -0,0 +1,7 @@
+object Test extends App {
+ // 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 => }
+}