News for hackers. Stuff that matters.
Re:Cap'n'Proto remote vuln: pointer overflow check optimized... by cperciva on Friday April 21, 2017 @05:13AM (#14164076)
C is unusual in having an explicit concept of undefined behaviour. But that doesn't mean that other languages don't have undefined behaviour... it just means that nobody has gone through the standard (if there even is a standard beyond "the language does what this implementation produces") and identified all of the gaps.
Re:Cap'n'Proto remote vuln: pointer overflow check optimized... by johncolanduoni on Friday April 21, 2017 @05:22AM (#14164114)
Is it that unusual? I've seen undefined behavior be specifically mentioned in both the Java and CLR standards. Rust's (admittedly squishy) "reference" also specifies a lot of behavior as undefined explicitly (along with a general "if you break mandated invariants behavior is undefined").
Re:Cap'n'Proto remote vuln: pointer overflow check optimized... by steveklabnik on Friday April 21, 2017 @09:48AM (#14165548)
In Rust's case, this is limited to unsafe code, at least; safe code should not have UB. (Though, IIRC there is one case right now, but that's a bug) UB is basically "breaking the invariants safe code expects."

Overflow is an example of something that's not UB in Rust, for example. (It's a "program error" and well-defined as two's compliment wrapping.)