Closed
Description
Trying to exit a Dart program after catching an OutOfMemoryError leads to the following behavior (call to exit happens right after printing oom):
out/DebugIA32/dart --enable-interpreter --optimization_level=3 --old_gen_heap_size=128 out.dill
foo0 throws
X0().foo0_1() throws
[9223372032559808639, 91, -58, -37, -39, 82, -45]
Exhausted heap space, trying to allocate 16 bytes.
oom
Exhausted heap space, trying to allocate 24 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
Exhausted heap space, trying to allocate 16 bytes.
...
To reproduce:
fuzz.dart.txt
sdk/pkg/vm/tool/gen_kernel --gen-bytecode --platform=sdk/out/DebugIA32/vm_platform_strong.dill -o out.dill fuzz.dart.txt
sdk/out/DebugIA32/dart --enable-interpreter --optimization_level=3 --old_gen_heap_size=128 out.dill
OutOfMemoryError is thrown in X2.foo2_0().