Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • lib
  • test_stackinit.c
Find file BlameHistoryPermalink
  • Kees Cook's avatar
    lib: test_stackinit.c: XFAIL switch variable init tests · 9cf016e6
    Kees Cook authored Apr 06, 2020
    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>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Cc: Jann Horn <jannh@google.com>
    Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Link: http://lkml.kernel.org/r/202002191358.2897A07C6@keescook
    
    
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    9cf016e6
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7