Skip to content

Commit aa4de5b

Browse files
committed
generalize endless loops to resource exhaustion
1 parent fc534cd commit aa4de5b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

const_safety.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ four possible ways:
99
* The program causes undefined behavior (e.g., dereferencing an out-of-bounds
1010
pointer).
1111
* The program panics (e.g., a failed bounds check).
12-
* The program loops forever, and this is detected by the loop detector. Note
13-
that this detection happens on a best-effort basis only.
12+
* The program exhausts its resources: It might overflow the stack, allocation
13+
too much memory or loops forever. Note that detecting these conditions
14+
happens on a best-effort basis only.
1415

1516
Just like panics and non-termination are acceptable in safe run-time Rust code,
1617
we also consider these acceptable in safe compile-time Rust code. However, we

promotion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ TODO: Fill this with information.
101101

102102
## Open questions
103103

104-
* There is a fourth kind of CTFE failure -- and endless loop being detected.
105-
What do we do when that happens while evaluating a promoted?
104+
* There is a fourth kind of CTFE failure -- resource exhaustion. What do we do
105+
when that happens while evaluating a promoted?

0 commit comments

Comments
 (0)