News for hackers. Stuff that matters.
Re:Rust web framework, Iron by TheHydroImpulse on Sunday August 16, 2015 @10:34PM (#10071108)
When one says unsafe or safe, it's primarily about type safety and more so memory safety, so it depends if you consider OOM a violation of memory safety.

If you don't have a hard limit in terms of your buffer or memory allocations (and have an unlimited upper-bound) you'll be in trouble sooner or later. I'd argue that it would be a far more robust principle to institute an upper-bound than trying to catch OOM errors.

Re:Rust web framework, Iron by mtanski on Sunday August 16, 2015 @11:01PM (#10071184)
Rust's goals are both type and memory safety. I consider an OOM with a panic/abort a memory safety issues. Linux also does these kinds of things to your process, but there at least you can opt out of it.

I agree with you, in the real world you need some kind of well tuned upper limits above which you apply back pressure / start dropping connections. But in the absence of this the runtime should try to make every possible attempt at forward progress (even if we're just limping along).

Re:Rust web framework, Iron by MichaelGG on Sunday August 16, 2015 @11:34PM (#10071270)
How is OOM unsafe? By that definition, all languages are unsafe.

And note, this is waving over the real safety issues that C/C++ has, which allows small bugs to turn into remote shells.

Re:Rust web framework, Iron by pcwalton on Monday August 17, 2015 @04:16AM (#10071800)
It's not a memory safety issue any more than any other kind of abort is. If it were, abort would be marked unsafe.

> But in the absence of this the runtime should try to make every possible attempt at forward progress (even if we're just limping along).

So what is your proposal?