Getting the maximum of your C compiler, for security
airbus-seclab.github.io
Getting the maximum of your C compiler, for security
1–10 of 10 posts
Re: Getting the maximum of your C compiler, for security
#2Be even nicer if it had a link or two for each option stated.
Re: Getting the maximum of your C compiler, for security
#3I recall getting a bit excited when I first read about it, but the results I got where a bit bizarre (e.g. every single function that allocated memory and returned a pointer to it was labeled as leaking memory; not really any useful info).
I did the fun exercise myself once to riffle through the gcc manpage, cobble together warning flags and massage them into autoconf[1][2].
There is a very handy m4 script in the util-linux source for testing supported warning flags[3].
[1] https://git.infradead.org/mtd-utils.git/blob/HEAD:/configure...
[2] https://github.com/AgentD/squashfs-tools-ng/blob/master/conf...
[3] https://github.com/karelzak/util-linux/blob/master/m4/compil...
Re: Getting the maximum of your C compiler, for security
#4IIRC fanalyzer is a fairly recent addition to gcc. Has it become reasonably usable yet? I recall getting a bit excited when I first read about it, but the results I got where a bit bizarre (e.g. every single function that allocated memory and returned a pointer to it was labeled as leaking memory; not really any useful info). I did the fun exercise myself once to riffle through the gcc manpage, cobble together warnin…
[1] https://www.gnu.org/software/autoconf-archive/ax_append_comp...
[2] https://www.gnu.org/software/autoconf-archive/ax_check_compi...
Re: Getting the maximum of your C compiler, for security
#5Re: Getting the maximum of your C compiler, for security
#6IIRC fanalyzer is a fairly recent addition to gcc. Has it become reasonably usable yet? I recall getting a bit excited when I first read about it, but the results I got where a bit bizarre (e.g. every single function that allocated memory and returned a pointer to it was labeled as leaking memory; not really any useful info). I did the fun exercise myself once to riffle through the gcc manpage, cobble together warnin…
Re: Getting the maximum of your C compiler, for security
#7Re: Getting the maximum of your C compiler, for security
#8IIRC fanalyzer is a fairly recent addition to gcc. Has it become reasonably usable yet? I recall getting a bit excited when I first read about it, but the results I got where a bit bizarre (e.g. every single function that allocated memory and returned a pointer to it was labeled as leaking memory; not really any useful info). I did the fun exercise myself once to riffle through the gcc manpage, cobble together warnin…
However I do find the output to be very verbose.
Re: Getting the maximum of your C compiler, for security
#9Re: Getting the maximum of your C compiler, for security
#10If you ship a public project and do not have fixed toolchain versions, remember to only use -Werror for CI and debug builds: you do not want people building your project to fail with an error at first try.