From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B03303858298; Thu, 23 Feb 2023 08:57:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B03303858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677142633; bh=vifYcnfXjLKurweqJDSm0m072uYZC4gwggoGfQXtgGk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mj7atKs1nue4gvw1vxS2L9oWKIK3lV2vv+8si1qNaFtFf8dMfq7EytS1fi8MGseze D+P1mKMrUeazBZXULLxoBE2g2zABgahKz2eSopm/vLug3A+u7druYlyjUCUSy0Kz+V LV88PWSvXxUIX2kO5fFHXw+lCFuii6llHk39llaQ= 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 08:57:12 +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 #5 from Jakub Jelinek --- For the uses of __bdos for -fsanitize=3Dbounds* IMHO certainly, we really shouldn't duplicate what another sanitizer does there. As for whether -fstrict-flex-arrays=3D should or shouldn't affect -fsanitize=3Dbounds, making it gradually equivalent to -fsanitize=3Dbounds-= strict, that is a question, perhaps if -fstrict-flex-arrays=3D is considered as cha= nging the exactly applicable language standard, with that option it might change = what is and is not undefined behavior. Siddhesh/Qing, what do you think? Note, clang doesn't support -fsanitize=3Dbounds-strict it seems, on the oth= er side -fsanitize=3Dbounds there is a union of -fsanitize=3Darray-bounds and -fsanitize=3Dlocal-bounds where the latter according to documentation isn't included in -fsanitize=3Dundefined, whatever it means. In gcc -fsanitize=3Dundefined similarly includes -fsanitize=3Dbounds but doesn't -fsanitize=3Dbounds-strict.=