Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e21d1db5 authored by Kees Cook's avatar Kees Cook Committed by Alistair Delva
Browse files

FROMLIST: lib: test_stackinit.c: XFAIL switch variable init tests

The tests for initializing a variable defined between a switch
statement's test and its first "case" statement are currently not
initialized in Clang[1] nor the proposed auto-initialization feature in
GCC.

We should retain the test (so that we can evaluate compiler fixes),
but mark it as an "expected fail". The rest of the kernel source will
be adjusted to avoid this corner case.

Also disable -Wswitch-unreachable for the test so that the intentionally
broken code won't trigger warnings for GCC (nor future Clang) when
initialization happens this unhandled place.

[1] https://bugs.llvm.org/show_bug.cgi?id=44916



Suggested-by: default avatarAlexander Potapenko <glider@google.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
[adelva: cherry picking to avoid boot test flakes]
Bug: 144999193
Link: https://lore.kernel.org/lkml/202002191358.2897A07C6@keescook/


Change-Id: I0e691f2299ab42526ea306a92551a1188c469136
Signed-off-by: default avatarAlistair Delva <adelva@google.com>
parent 3fe2bfe1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment