From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 930DD3852C49; Mon, 5 Dec 2022 23:08:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 930DD3852C49 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670281715; bh=kWDUa/+4JFAlBSgHU7cH097HdOnziXL9lnRitDM+K34=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I5fYUuXhKNFF96VQPVC6a1xAPgqN9Sw6e2MmMJaYzFVr3ukAMDIrS8pw6I4zKLTsS kr102yWgveLpD9PMGJ5MWwn8TFMb0zC0HUXqS64AXpf+vgCRH5BCyzqrtcdOU8FWFD rMO/aFrAnuAYkwG+9ucVosgt+FTvA4y9SaB/s29Q= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/106325] -Wanalyzer-null-dereference false positive due to analyzer not making assumptions for `__attribute__((nonnull))` Date: Mon, 05 Dec 2022 23:08:35 +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: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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=3D106325 --- Comment #6 from David Malcolm --- Fix for the overzealous reducing is to simply add "__attribute__((nonnull(1, 2)))" to the reproducer here: __attribute__((nonnull(1, 2))) void arranger_object_unsplit (ArrangerObject *r1, ArrangerObject *r2, ArrangerObject **obj, _Bool fire_events) I'm working on a fix for the false +ve.=