PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.67k stars 907 forks source link

Ponder building with `-Werror=strict-overflow` in our CI #13241

Open rgacogne opened 1 year ago

rgacogne commented 1 year ago

Short description

-Wstrict-overflow 1 can be used to tell the compiler to issue a warning every time it optimizes based on the assumption that signed overflow does not occur, which might indicate a problem. There are different levels so we would need to first check that our code base is clean and if possible select an appropriate level to enforce in our CI. Note that this is a g++-only option, it is ignored in clang, so we would need to do a build with g++ from time to time, perhaps once a day? It would not be a bad idea to do so anyway.

Habbie commented 1 year ago

(Most of) the daily package builds (https://github.com/PowerDNS/pdns/actions/workflows/builder.yml) use g++, but all the way inside pdns-builder and Docker, I'm not sure that qualifies?

The daily coverity builds currently use clang, but only because it was convenient code/script reuse. We could change that.

Ah! The CodeQL builds (which we do run on PRs) use g++, currently on ubuntu-20.04 but perhaps that could be ubuntu-22.04. Would that be useful?

rgacogne commented 1 year ago

It looks like the CodeQL build could fit indeed, thanks! I'll have a look.