I agree with this. C and C++ would be better without UB. http://www.yodaiken.com/wp-content/uploads/2018/05/ub-1.pdf …
-
-
If the malloc is written in C (it is), then there's no problem: the C standard's claim that "any byte in any object would be overwritten by OOB" would capture the effect on malloc.
-
It's not. It's defined formally as part of the language. Typical C implementations would not be permissible under your proposal.
-
Typical C implementations implement malloc in C.
-
malloc cannot be implemented in C. It can at best be implemented in a mix of C and special constructs or rule-exceptions outside the C language.
-
I assure you that I've implemented malloc in C. It was in a .c file and it compiled with a C compiler. Separately, I don't care if the spec in its current form recognizes my malloc as being written in C. That's not relevant to whether or not it's written in C.
End of conversation
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.