From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04A213858D33; Tue, 28 Feb 2023 19:04:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04A213858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677611070; bh=+Cnh90MHRg5DkbwqNOcJ21YBHYfDAOdoIKI7SjAyZic=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wD1ZX3PPWdv+iFid0jMbM1HUWZckkWHLa0GV7U7uPoc+vdFOQ4aTdT3SIwqPpfIc7 CtP7QRotQbybtZNNlA16bE9B1IxzSGbrbJ/6zNNebLUmoQJxTnnYd5Bax3MN/jWKkp UgpQ8O/CjJjCc9YLDTHyfazVOgjBTEkmgzuPQBQc= From: "andrew.cooper3 at citrix dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/108968] fanalyzer false positive with the uninitalised-ness of the stack pointer Date: Tue, 28 Feb 2023 19:04:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andrew.cooper3 at citrix dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm 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=3D108968 --- Comment #6 from Andrew Cooper --- (In reply to David Malcolm from comment #5) > Minimal reproducer: https://godbolt.org/z/E6EEY1WT6 >=20 > Am I right in understanding that: > register unsigned long sp asm("rsp"); > is intended as a way to read the %rsp register? Ultimately, yes. More generally, this just creates a way to access the specific register. It is the only way for example to create an asm constraint on e.g. %r8, so = the following is common to see for MSABI: register unsigned long param asm ("%r8"); param =3D 4; asm ("tdcall/whatever" : "+r" (param) ...); (Example here is from Intel's new TDX technology, but the actual asm instruction isn't important.)=