From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A15C63858406; Wed, 1 Dec 2021 14:43:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A15C63858406 From: "dlong at cadence dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/103519] New: Address sanitizer check missing for AVX512 masked load Date: Wed, 01 Dec 2021 14:43:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dlong at cadence dot com 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2021 14:43:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103519 Bug ID: 103519 Summary: Address sanitizer check missing for AVX512 masked load Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: dlong at cadence dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxi= n at gcc dot gnu.org Target Milestone: --- Example with generated assembly available here: https://godbolt.org/z/WTo5s= GThb In this: #include __m512d v; void access(float const *addr) { __m512d val; __m256 val1; __mmask8 const k3 =3D 0x3f; val1=3D_mm256_maskz_loadu_ps(k3, addr); val=3D_mm512_cvtps_pd(val1); _mm512_storeu_pd((double *)&v, val); } when compiled with AVX512 instructions and -fsanitize=3Daddress, no address= check is generated for the maskz_load. (FWIW, if the mask is folded into the conversion using maskz_cvtps_pd inste= ad then a check is generated. However it's a check for a full 32-byte access = even though the CPU will only actually access 24-bytes due to the mask.)=