From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6757A3858C5F; Wed, 13 Sep 2023 16:22:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6757A3858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694622153; bh=C3WWzIFArlEQX5Q8hCXfzHvhGdo3OGbvp1UhBQBOsRk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uZeyuG6sg8PnYAH4gsuaVMZdP6cvryK+DuykjelMBbsdn+txJ0SFHUqqNd8zSZt7n 8x1IRpkzKNUb81PesS6LzzKXn2JRjaB0Uvh6+rXGmAL0D2Tc9a/7omGwTB7H1vVXrF 3XNMUSf49ck6dJjN6efPUNN88LzK+gWzlgjJ+MgU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111400] Missing return sanitization only works in C++ Date: Wed, 13 Sep 2023 16:22:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111400 --- Comment #5 from Andrew Pinski --- To be able to detect this, an ABI change would be needed as you need to pass back if the function fell through or not. Now for (non-address taken) static functions that should be ok. The check should happen on the caller side rat= her than the callee side as it is only undefined if the caller uses the value .= ..=