diff options
author | Kees Cook <keescook@chromium.org> | 2022-06-08 14:40:24 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2022-07-27 13:34:41 -0700 |
commit | aaf50b1969d7933a51ea421b11432a7fb90974e3 (patch) | |
tree | 2960ebfa9ee7f46152ac17765941838b73883bd0 /lib/zstd/zstd_decompress_module.c | |
parent | b4909252da9be56fe1e0a23c2c1908c5630525fa (diff) | |
download | linux-aaf50b1969d7933a51ea421b11432a7fb90974e3.tar.bz2 |
kasan: test: Silence GCC 12 warnings
GCC 12 continues to get smarter about array accesses. The KASAN tests
are expecting to explicitly test out-of-bounds conditions at run-time,
so hide the variable from GCC, to avoid warnings like:
../lib/test_kasan.c: In function 'ksize_uaf':
../lib/test_kasan.c:790:61: warning: array subscript 120 is outside array bounds of 'void[120]' [-Warray-bounds]
790 | KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[size]);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../lib/test_kasan.c:97:9: note: in definition of macro 'KUNIT_EXPECT_KASAN_FAIL'
97 | expression; \
| ^~~~~~~~~~
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: kasan-dev@googlegroups.com
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220608214024.1068451-1-keescook@chromium.org
Diffstat (limited to 'lib/zstd/zstd_decompress_module.c')
0 files changed, 0 insertions, 0 deletions