mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 09:00:10 +01:00
I couldn't figure out a way to actually hit a reasonable out-of-memory case once I add the maximum interpreter step count. However, the step count limit seems more important. I've moved the todo stack limit out of function calls because there are plenty of ways to build up the todo stack without any function calls. Fixes #2791
15 lines
427 B
Plaintext
15 lines
427 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// NOAUTOUPDATE
|
|
// RUN: %{not} %{explorer-run}
|
|
// CHECK:STDERR: RUNTIME ERROR: overflow:1: Possible infinite loop: too many interpreter steps executed
|
|
|
|
package ExplorerTest impl;
|
|
|
|
fn Main() -> i32 {
|
|
while (true) { }
|
|
return 0;
|
|
}
|