Skip to content

Commit 2aa9369

Browse files
cupermiranakryiko
authored andcommitted
selftests/bpf: Disable strict aliasing for verifier_nocsr.c
verfifier_nocsr.c fails to compile in GCC. The reason behind it was initially explained in commit 27a90b1. "A few BPF selftests perform type punning and they may break strict aliasing rules, which are exploited by both GCC and clang by default while optimizing. This can lead to broken compiled programs." Signed-off-by: Cupertino Miranda <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 955bba7 commit 2aa9369

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/bpf/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ progs/test_pkt_md_access.c-CFLAGS := -fno-strict-aliasing
5858
progs/test_sk_lookup.c-CFLAGS := -fno-strict-aliasing
5959
progs/timer_crash.c-CFLAGS := -fno-strict-aliasing
6060
progs/test_global_func9.c-CFLAGS := -fno-strict-aliasing
61+
progs/verifier_nocsr.c-CFLAGS := -fno-strict-aliasing
6162

6263
ifneq ($(LLVM),)
6364
# Silence some warnings when compiled with clang

0 commit comments

Comments
 (0)