From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id C91103857B9B; Thu, 8 Jun 2023 10:42:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C91103857B9B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686220957; bh=ubXOGNJnX5cvI4GzyEFpThd4sL5s05qfTCXiVGxCQw4=; h=From:To:Subject:Date:From; b=TP4dWbvtMJ/NLUqCJFSlCOWFQ6VdQA5xKVYkKLU1O/y9HoXbXlxxnd7u330gxKymP 2LrOSd+7zkF5EB/X4kMYUD2Os6iW/5RRX/gZ9AWGhDdu+Zw4GB8WV+2aw4YyyPG7E+ qreaSdX4Xc0RWTXCwMK5sCwKGjkgrukRH8KpBal8= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] hardcfr: add optional checkpoints [ada docs] X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: a0263378ae0f4aa6f7abb7f89fe3da71cb6f96ff X-Git-Newrev: d2dab2c197309539d2e8891eb860015fceea556d Message-Id: <20230608104237.C91103857B9B@sourceware.org> Date: Thu, 8 Jun 2023 10:42:37 +0000 (GMT) List-Id: https://gcc.gnu.org/g:d2dab2c197309539d2e8891eb860015fceea556d commit d2dab2c197309539d2e8891eb860015fceea556d Author: Alexandre Oliva 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: