From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D0733858C62; Sun, 9 Apr 2023 07:07:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D0733858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681024053; bh=FDYXHH6xtWjAys50lTY5GwyDqT6/BcUm6oLxFWV0dCc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=flpBxIPpK2MxqGgb0dm4uEMUIsJji7yrG0I/B4uJkuYVZd+4kANcfZNgxRi72u7Aq 6QqRuJzVTQoznu+uGRUt1Y2MqtqTWt2rL2/89ldxmQsZQ/dh1DdKGTd1r/ArxP6/w4 qB4EIws0+AEl/9BilbRJsjTYFylrM+PFG0Td/LSQ= From: "christian.prochaska@genode-labs.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/104288] [11/12 Regression] EVRP null pointer check removal for strcmp (and maybe others) is not flow senative Date: Sun, 09 Apr 2023 07:07:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: christian.prochaska@genode-labs.com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.3 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=3D104288 --- Comment #16 from Christian Prochaska --- (In reply to Andrew Pinski from comment #14) >=20 > There was a deferencing of myself before: > Nova::Utcb &utcb =3D *(Nova::Utcb *)myself->utcb(); I see. The 'Thread::utcb()' function handles the null pointer case internal= ly with a 'this =3D=3D 0' check and a local '-fno-delete-null-pointer-checks' attribute: https://github.com/genodelabs/genode/blob/a84af9a9606450471b8038a35f9b55057= efa0850/repos/base-nova/src/lib/base/stack.cc#L110 So, the elimination of the 'myself' null pointer check is basically a resul= t of undefined behavior with the 'Thread::utcb()' function?=