Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate implicit out-of-memory panics #40

Open
nuta opened this issue Nov 1, 2021 · 3 comments
Open

Eliminate implicit out-of-memory panics #40

nuta opened this issue Nov 1, 2021 · 3 comments

Comments

@nuta
Copy link
Owner

nuta commented Nov 1, 2021

Currently. Kerla extensively uses containers provided by liballoc. The problem is they can panic on memory allocation failures. Use failable methods (i.e. returning Result<T>) to improve the robustness.

Alternatives to liballoc

  • Scapegoat - Ordered set and map data structures
@michalfita
Copy link
Contributor

Interested in working on this one, but I can't start now such large assignment.

@nuta
Copy link
Owner Author

nuta commented Nov 2, 2021

Great! You don't need to replace all at once. Let's improve the existing implicit panics gradually just like #29.

@michalfita
Copy link
Contributor

I took a peek at basic use of alloc in Kerla and what Scapegoat offers and I think it's apples vs. oranges. I remember originally one more crate mentioned, but it's gone now.

I'm afraid replacing Box<T> with something that may gracefully fail is going to be deeply non-trivial as many containers will assume a Box<T> instance can be consumed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants