GCC security features from AdaCore

Post Syndicated from corbet original https://lwn.net/Articles/959461/

The AdaCore blog describes
some hardening features
contributed to GCC for the GCC 14 release.

With -fharden-control-flow-redundancy, the compiler now verifies,
at the end of functions, whether the traversed basic blocks align
with a legitimate execution path. The purpose of this protective
measure is to detect and thwart attacks attempting to infiltrate
the middle of functions, thereby enhancing the overall security
posture of the compiled code.