From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7AB6A3858D1E; Sun, 19 May 2024 15:14:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AB6A3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716131675; bh=/UEAdWhewTWf433JpeKinM0gUUzjRltzEav3VCOIPoI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t2YG35j9YnCV8zOCzEteR+OOQmRoKa4z1PeDdur6jiDFqPN6sozLXUILnT74UCRK3 zxL7WBc/9rjeJeaMwdOQWeH8OB+RoaYrN+ADcRAmBTLqn8sc4h2+0yfyIbFcMTfedh hK1VaeeWVFiRadflGFyjSw7DycM3cBUFUUvTf0uM= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/115156] [14/15 Regression] passing zero to __builtin_clzl() check missing Date: Sun, 19 May 2024 15:14:34 +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: 14.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D115156 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Started with r14-1880-g827e208fa64771f15fc8e53970a2297e637277b5 Note, the functions in question are const, so they can be dead code elimina= ted at any time, and the UBSAN instrumentation in this case is done only in the ubsan pass, so if it gets folded away before that it won't be instrumented. At -O1 or higher it would be a clear non-bug, with optimizations sanitizers often diagnose only UB in code that isn't dead, in this case a question is = why we are folding this at -O0.=