From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF03A3857704; Wed, 3 May 2023 16:51:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF03A3857704 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683132704; bh=kbeC15xJn560ONgcUdSnvI1aSwQWmadgkdsbflQpv6A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ljFft5TIUkn9hYgCqiET4NavzMih4HKxL0K7OMEymsEvMvj+ThTuQ2rLCkPLVWRSY fjiitu6SAvzSU0insOD6Ab/ompp/bH6B5hhJ8SmkqhWouUyM6EtdHXBV6YuOn9UNIb w4jBnjSKBW3gL49j4cJSBUoCeVHaHo5DEQXKC2YE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/90746] __sanitizer_cov_trace_pc should not be tail called Date: Wed, 03 May 2023 16:51:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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=3D90746 --- Comment #4 from CVS Commits --- The master branch has been updated by Alexander Monakov : https://gcc.gnu.org/g:cef0c0bb13e2953b41caca0506ab1d41c56f29de commit r14-457-gcef0c0bb13e2953b41caca0506ab1d41c56f29de Author: Alexander Monakov Date: Thu Jan 19 19:25:04 2023 +0300 do not tailcall __sanitizer_cov_trace_pc [PR90746] When instrumentation is requested via -fsanitize-coverage=3Dtrace-pc, G= CC emits calls of __sanitizer_cov_trace_pc callback in each basic block. This callback is supposed to be implemented by the user, and should be able to identify the containing basic block by inspecting its return address. Tailcalling the callback prevents that, so disallow it. gcc/ChangeLog: PR sanitizer/90746 * calls.cc (can_implement_as_sibling_call_p): Reject calls to __sanitizer_cov_trace_pc. gcc/testsuite/ChangeLog: PR sanitizer/90746 * gcc.dg/sancov/basic0.c: Verify absence of tailcall.=