bearophile wrote:
"SoftBound: Highly Compatible and Complete Spatial Memory Safety for
C" by  Santosh Nagarakatte, Jianzhou Zhao, Milo M K Martin and Steve
Zdancewic: http://llvm.org/pubs/2009-06-PLDI-SoftBound.html

It's a block of about 6000 lines of C++ code that augment the LLVM
compiler, adding extra tests. It avoids out-of-bound situations with
pointers. It works after the compilation stage, on the LL code
produced by LLVM, so it can be used equally for C or D. Conceptually
looks like a simple thing. Currently can't be used yet, but I'd like
to have a compilation flag in LDC to activate this. In in nonrelease
mode some of the tests are already present (the bound tests of
arrays), so it can avoid to put them in twice (in LDC you can disable
only bound tests, and keep assertions, etc).

I don't think there's much point to this in D. You rarely need to deal with pointers directly. Arrays are already checked.

Reply via email to