4 ms·
It offers bounds checking! The documentation links to http://www.doc.ic.ac.uk/~phjk/BoundsChecking.html http://www.doc.ic.ac.uk/~phjk/BoundsChecking.html Some
by foobar_ 6y ago
It offers bounds checking! The documentation links to
http://www.doc.ic.ac.uk/~phjk/BoundsChecking.html http://www.doc.ic.ac.uk/~phjk/BoundsChecking.html
Someone needs to add this to llvm.
- shakna 6y agoWhilst TCC's bounds check was rare for quite some time, the bigger compilers do now actually offer it. Clang supports bounds checking as part of -fsanitize=address, (though with a few more flags you can _just_ have bounds checking instead of the other sanitisation options). (Since around 2015?) GCC supports bounds checking and others, depending on which frontend you're using the options can change. (Like -fbounds-checking for C, and -fcheck=all for gfortran). (Since around 2013? GCC 4.71) Even Intel has -check=bounds. (Though not under macOS). (Since around 2015?)
- foobar_ 6y agoWow did not know that. Is there a distribution that offers bounds checking for all linux software ? I wonder how slow a typical LAMP stack will be. My guess is no more than 5x. I think thats an acceptable tradeoff. I'm guessing there's a way to add global compiler flags in source distributions like Arch linux / BSD.
- shakna 6y agoGentoo has a few ways to set up global C flags [0], because the default is to compile all your software yourself. (Arch isn't actually a source distro, it's binary, though rolling release. Gentoo is, however). [0] https://wiki.gentoo.org/wiki/USE_flag https://wiki.gentoo.org/wiki/USE_flag