mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 21:01:50 +00:00
7d79d215db
Issue https://github.com/dart-lang/sdk/issues/43543 Change-Id: I61472be2507ce97721ab162a8c86f9662ec27f72 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164540 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
25 lines
658 B
Dart
25 lines
658 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// VMOptions=--old_gen_heap_size=20
|
|
// VMOptions=--old_gen_heap_size=20 --enable_vm_service --pause_isolates_on_unhandled_exceptions
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
main() {
|
|
var leak;
|
|
var exceptionThrown = false;
|
|
try {
|
|
leak = [];
|
|
while (true) {
|
|
leak = [leak];
|
|
}
|
|
} on OutOfMemoryError catch (exception) {
|
|
leak = null;
|
|
exceptionThrown = true;
|
|
print("Okay");
|
|
}
|
|
Expect.isTrue(exceptionThrown);
|
|
}
|