News for hackers. Stuff that matters.
Re:Everything in C is undefined behavior by kobebrookskC3 on Wednesday May 20, 2026 @08:49PM (#48216371)
> Constructing an invalid pointer in rust is UB

no, it is dereferencing, not constructing, an invalid pointer, that is UB. there is even a safe function provided to construct an invalid but non-null pointer: `https://doc.rust-lang.org/stable/std/ptr/fn.dangling.html`

Re:Everything in C is undefined behavior by 12_throw_away on Friday May 22, 2026 @02:37PM (#48239689)
you're of course 100% right, I was so proud of my nerd joke that I got like the most basic rust safety rule wrong :(