4 ms·
> NULL checks which would normally prevent you from accessing invalid pointers now will pass and send you along to deref your bogus pointer. Oddly, this is bog
by bobmcnamara 1y ago
> NULL checks which would normally prevent you from accessing invalid pointers now will pass and send you along to deref your bogus pointer.
Oddly, this is bog standard implementation specific behavior for standard C - caller accessing any result of malloc(0) is undefined behavior, and malloc(0) isn't required to return NULL - the reference heap didn't, and some probably still don't.
- sweetjuly 1y agoAh, that's my bad. Another day, another UB :)
- bobmcnamara 1y agoLike swimming in a bucket of rusty knives :)