Skip to content

Commit 03e1164

Browse files
committed
tests: Add avm2/bytearray_oom test
This test verifies what the OOM error looks like.
1 parent 3c7553f commit 03e1164

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package {import flash.display.MovieClip;public class Test extends MovieClip {}}
2+
3+
import flash.utils.ByteArray;
4+
5+
try {
6+
new ByteArray().length = 0xFFFFFFFF;
7+
trace("Success");
8+
} catch (e) {
9+
trace(e.getStackTrace());
10+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Error: Error #1000: The system is out of memory.
2+
at flash.utils::ByteArray/set length()
3+
at global$init()
720 Bytes
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
num_ticks = 1
2+
3+
# TODO Ruffle OOMs
4+
ignore = true

0 commit comments

Comments
 (0)