diff options
| author | Kevin Brodsky <kevin.brodsky@arm.com> | 2024-12-09 12:50:09 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-14 09:40:54 +0300 |
| commit | 71384f84cbbe7660023b01c1a0fa9cc7dbc487a7 (patch) | |
| tree | 40a85f2cb78b351f7672eebabaade4efae7890bc /tools/perf/scripts/python/bin | |
| parent | 5b6b2799f617b3259d551980fa94f290d96bc593 (diff) | |
| download | linux-71384f84cbbe7660023b01c1a0fa9cc7dbc487a7.tar.xz | |
selftests/mm: fix -Warray-bounds warnings in pkey_sighandler_tests
GCC doesn't like dereferencing a pointer set to 0x1 (when building
at -O2):
pkey_sighandler_tests.c:166:9: warning: array subscript 0 is outside array bounds of 'int[0]' [-Warray-bounds=]
166 | *(int *) (0x1) = 1;
| ^~~~~~~~~~~~~~
cc1: note: source object is likely at address zero
Using NULL instead seems to make it happy. This should make no difference
in practice (SIGSEGV with SEGV_MAPERR will be the outcome regardless), we
just need to update the expected si_addr.
[kevin.brodsky@arm.com: fix clang dereferencing-null issue]
Link: https://lkml.kernel.org/r/20241218153615.2267571-1-kevin.brodsky@arm.com
Link: https://lkml.kernel.org/r/20241209095019.1732120-5-kevin.brodsky@arm.com
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Keith Lucas <keith.lucas@oracle.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: kernel test robot <lkp@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
