Project

General

Profile

Actions

Bug #16946

closed

Infinite loop in `for` may leak memory

Added by François ARMAND over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

See: https://stackoverflow.com/a/59349106/436331

The problem is in construct like:
```
def loop() = {
for {
_ <- dosomething
_ <- loop()
} yield ()
```

The advice it to either:
1/ use `better monadic for` (https://github.com/oleg-py/better-monadic-for) plugin, but we cannot because if breaks lift
2/ rewrite these loop using `forever` (easy and clearly explains what it does).

So we don't have much choice actually.

Actions

Also available in: Atom PDF