From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B4F538582B0; Thu, 23 Feb 2023 21:10:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B4F538582B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677186628; bh=KT/sgfjqzc0NW/nENXCJIQi2U/bifw6YrvL6DE+rtFg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rnaWLwWTLNGLRm/wTIMtdsG3qv11gDxfchbEujv9zNgcetZNuDiJHLsJTB+dqs9PJ t6qCpT0vqFiIwjWk/iZZaAwkVjJqYY9oqBa8lUQmUrh2IB7fzOe9hRE9BGGkdlpgK9 IVVII2UR/OuJU69hxx7bh8+prwo1K8WxYNMLpGGc= From: "qinzhao at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/108894] -fsanitize=bounds missing bounds provided by __builtin_dynamic_object_size() Date: Thu, 23 Feb 2023 21:10:28 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: qinzhao at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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=3D108894 --- Comment #9 from qinzhao at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #8) > Well, -fsanitize=3Dbounds-strict certainly shouldn't imply > -fstrict-flex-arrays=3D2, > it should just treat [1] and [4] (but I think it does even [0] right now)= as > regular arrays for the purposes of the sanitization. with a small example I just tested, with -fsanitize=3Dbounds-strict, I can = see, it treats: [], [0] as flexible array members; but [1], [4] as regular arrays This is the same level as -fstrict-flex-arrays=3D2.=20 should we just keep its default behavior like this, or let it more strictly= as -fstrict-flex-arrays=3D3?=