Re:Oops It's a kernel stack use-after-free: Exploiting Nvidi...
by tialaramex on Friday October 17, 2025 @05:01AM
(#45614628)
I agree that's an error on my part - Zig does not actually have the billion dollar mistake, although I don't think the approach taken is very good it's clearly not just the billion dollar mistake and so I was wrong to say that.
[ Parent
| on HN ]
Re:Oops It's a kernel stack use-after-free: Exploiting Nvidi...
by jibal on Friday October 17, 2025 @10:54PM
(#45624514)
> although I don't think the approach taken is very good
The approach taken is the same as in virtually every other language that has avoided the billion dollar mistake -- null is not a valid pointer value, and instead there's an additional union type (called Optional, Maybe, etc.) that can hold Some(pointer) or None. Zig, like some other languages, extends this union beyond pointers to other types.