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
* [Bug sanitizer/103519] Address sanitizer check missing for AVX512 masked load
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 ` dlong at cadence dot com
2021-12-02 1:27 ` crazylht at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dlong at cadence dot com @ 2021-12-01 14:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103519
David Long <dlong at cadence dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dlong at cadence dot com
--- Comment #1 from David Long <dlong at cadence dot com> ---
(In case the godbolt link happens to disappear at some point, compilation
options are -mavx512f -mavx512vl -mfma -mbmi2 -O -fsanitize=address)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/103519] Address sanitizer check missing for AVX512 masked load
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
3 siblings, 0 replies; 5+ messages in thread
From: crazylht at gmail dot com @ 2021-12-02 1:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103519
--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
get_mem_refs_of_builtin_call doesn't handle target-specific builtins.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/103519] Address sanitizer check missing for AVX512 masked load
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
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-12-02 10:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103519
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-12-02
Ever confirmed|0 |1
Target| |x86_64-*-*
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's currently no way to do that.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/103519] Address sanitizer check missing for AVX512 masked load
2021-12-01 14:43 [Bug sanitizer/103519] New: Address sanitizer check missing for AVX512 masked load dlong at cadence dot com
` (2 preceding siblings ...)
2021-12-02 10:54 ` rguenth at gcc dot gnu.org
@ 2021-12-02 11:55 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-12-02 11:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103519
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
There could be a target hook for that, or the builtin expansion could emit the
sanitization code itself. But I bet we have hundreds of various load intrinsic
builtins on various targets...
^ 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).