From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 69226385840F; Thu, 2 Mar 2023 19:25:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69226385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677785134; bh=Bzp3OKzkjTYjtAnsACtFj+9duaa6uo7lh8hxOVa/Luo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lh9R/q9lSDzfPPGuNRxt/kzjCUXltKQ6cWvGIWEVojl2n1/GRQRBXvs/pMN/Hu6Hm 1GPpy1LRW54X1PTEjD0LDWFPnAxdeUCBbCiRe0n/C9cs/HnV9WqCWxWTY9zB5/EX5A GaavSfRcjJ8mN8gq2CxorObS3zSeHqq/u48s2VQc= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/108968] fanalyzer false positive with the uninitalised-ness of the stack pointer Date: Thu, 02 Mar 2023 19:25:34 +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: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: cf_reconfirmed_on bug_status everconfirmed 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 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-03-02 Status|UNCONFIRMED |WAITING Ever confirmed|0 |1 --- Comment #8 from David Malcolm --- I've attempted to work around this with the above patch (for gcc 13). As written, this ought to suppress the "uninit" false positive, but I didn't have a good kind of symbolic value to use for the resulting pointer, hence = the analyzer will treat the result of get_cpu_info as an "unknowable" pointer, which might lead to a chain of follow-up false positives if there's logic in the code being analyzed that relies on dereferencing the result and getting consistent results. Can you attach a typical preprocessed source file from xen (the GPL licensed part) that was showing this (use -E), so I can poke at it to see how well t= his workaround works - thanks! Keeping open in case this needs further work, and to possibly track backpor= ting to GCC 12.=