3 ms·
Writing Bounds-Safe Code in C with Arrays
- rramadass 1y agoGood, succinct and to-the-point article. References: GCC: https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Instrumentation-Options.html https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Instrumentation... Clang: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
- kilpikaarna 1y agoRare to see VLAs described as "one of the coolest features of C".
- uecker 1y agoNote that this is about pointers to variably length arrays, and not a VLA on the stack. But both are cool features. Bounds checking would be further ahead, if VLAs did not get a bad reputation from poor compilers that did not do stack probing.