-
-
@spun_off The latter bad design was to match glibc ABI for binary stuff that pokes at internals (due to getc/putc macros), but...
-
@spun_off ...we could instead put perma-nulls at those offsets in FILE and use a pos/len representation elsewhere in the structure.
-
@spun_off It will just take a lot of work to refit all the code using them.
End of conversation
New conversation -
-
-
@RichFelker Having discussed the above I don't suppose it interests you that musl also does this? https://goo.gl/GW7kn9 -
@spun_off musl compares null and non-null ptrs with <? Where?
-
@RichFelker Here—line 6: http://git.musl-libc.org/cgit/musl/tree/src/stdio/__toread.c#n6 … as reached from wcstoll(). -
@RichFelker @spun_off Judging by commit message, "NULL > ptr" is replaced by "NULL > NULL" which is still UB, right? -
@ch3root @spun_off I assumed relational operators were well-defined with both operands null, but maybe they're not? -
@ch3root @spun_off It looks like subtraction of null pointers from each other might also be gratuitously undefined. :-( -
@ch3root @spun_off Together these leave a lot of real-world programs wit "gratuitous UB" that's hard to fix. - 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.