You know, double-free/invalid-free bugs could be trivially eliminated with an ABI having fat pointers.
-
-
Replying to @RichFelker
At malloc time, assign an unpredictable, non-reusable 64-bit ID to the allocation and return it as part of the pointer value.
1 reply 0 retweets 7 likes -
Replying to @RichFelker
Non-malloc pointers have arbitrary (e.g. all zero bits). Now free can trap if the id in the fat pointer doesn't match the pointed-to block.
2 replies 0 retweets 5 likes -
Replying to @RichFelker
cool idea. would it be possible (or worthwhile) to cram a 16-bit ID into the unused high-order bits on x86-64?
1 reply 0 retweets 0 likes
Replying to @int10h
I don't think so. It's insufficient to protect against intentional attacks and mandates an ABI change anyway.
7:54 PM - 28 Sep 2016
0 replies
0 retweets
1 like
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.