From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D12AB3858C00; Thu, 23 Feb 2023 19:43:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D12AB3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677181425; bh=uFahS5WNI+yMckvstlyrEJZ6Ck8DVHuHDb+FxT9m/pE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vEU5OlVvjwMmgojgD89ViAuJWgYpuTx1B6/CVcCApUPiS7xJGtjm6zuH6UWGTdCe3 4wFXf8XoePyCtMwib60IQ3I681+5Nu2IVbvO4GGQwQxw3X6iAfRIaKiOkz98XMe+MC 6QtBzrEW5Hv8nuKDUsgNw4AWSVuNFHRvvf2HFgT4= From: "jakub 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 19:43:45 +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: jakub 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 #8 from Jakub Jelinek --- (In reply to qinzhao from comment #7) > 1. let -fstrict-flex-arrays=3DN to control the behavior of -fsanitize=3Db= ounds; I'm ok with that. > 2. -fsanitize=3Dbounds-strict actually is an alias of -fsanitize=3Dbounds > -fstrict-flex-arrays=3D2, i.e, it treats [], [0] as flexible array membe= rs, > but treat [1], [4], as regular arrays. 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.=