Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Whilst 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?)



Wow 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.


Gentoo 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: