public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/103519] New: Address sanitizer check missing for AVX512 masked load
@ 2021-12-01 14:43 dlong at cadence dot com
  2021-12-01 14:52 ` [Bug sanitizer/103519] " dlong at cadence dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dlong at cadence dot com @ 2021-12-01 14:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103519

            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, marxin at gcc dot gnu.org
  Target Milestone: ---

Example with generated assembly available here: https://godbolt.org/z/WTo5sGThb

In this:

#include <x86intrin.h>

__m512d v;

void
access(float const *addr)
{
  __m512d val;
  __m256 val1;
  __mmask8 const k3 = 0x3f;
  val1=_mm256_maskz_loadu_ps(k3, addr);
  val=_mm512_cvtps_pd(val1);
  _mm512_storeu_pd((double *)&v, val);
}

when compiled with AVX512 instructions and -fsanitize=address, no address check
is generated for the maskz_load.

(FWIW, if the mask is folded into the conversion using maskz_cvtps_pd instead
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.)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-02 11:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 14:43 [Bug sanitizer/103519] New: Address sanitizer check missing for AVX512 masked load dlong at cadence dot com
2021-12-01 14:52 ` [Bug sanitizer/103519] " dlong at cadence dot com
2021-12-02  1:27 ` crazylht at gmail dot com
2021-12-02 10:54 ` rguenth at gcc dot gnu.org
2021-12-02 11:55 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).