2 ms·
It really is a clever hack to catch a bounds error by forcing a segfault. Where to put the tag is a problem for replacing pointers generically, but I think it'
by ben509 9y ago
It really is a clever hack to catch a bounds error by forcing a segfault.
Where to put the tag is a problem for replacing pointers generically, but I think it's still pretty reasonable to use the 64-bit pointer version with just a minimum of language support. The trickiest buffers are often under 64K and we usually want to keep them small to live in cache, so if you have a "safe_alloc" function, all your IO loops, parsers, etc. that are dealing with user input could benefit from this.