[gcc(refs/users/aoliva/heads/testme)] hardcfr: add optional checkpoints [ada docs]
Alexandre Oliva
aoliva@gcc.gnu.org
Fri Jun 9 06:16:32 GMT 2023
https://gcc.gnu.org/g:c66ec1a0792b659633ac071693791a87842a0dae
commit c66ec1a0792b659633ac071693791a87842a0dae
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Jun 8 01:34:59 2023 -0300
hardcfr: add optional checkpoints [ada docs]
Previously, control flow redundancy only checked the visited bitmap
against the control flow graph at return points and before mandatory
tail calls, missing various other possibilities of exiting a
subprogram, such as by raising or propagating exceptions, and calling
noreturn functions. The checks inserted before returns also prevented
potential tail-call optimizations.
This incremental change introduces options to control checking at each
of these previously-missed checkpoints. Unless disabled, a cleanup is
introduced to check when an exceptions escapes a subprogram. To avoid
disrupting sibcall optimizations, when they are enabled, checks are
introduced before calls whose results are immediately returned,
whether or not they are ultimately optimized. If enabled, checks are
introduced before noreturn calls and exception raises, or only before
nothrow noreturn calls.
Add examples of code transformations to the GNAT RM.
for gcc/ada/ChangeLog
* doc/gnat_rm/security_hardening_features.rst: Document
optional hardcfr checkpoints.
Diff:
More information about the Gcc-cvs
mailing list