Menu

check complete Linux kernel

2024-05-05
2024-05-07
  • Javier Carrasco

    Javier Carrasco - 2024-05-05

    I tried check the whole Linux kernel project with cppcheck, but I got a segmentation fault.
    Steps:
    1. Build the kernel (I built it for x86_64 with gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0 ).
    2. Generate compile_commands.json with the script scripts/clang/gen_compile_commands.py.
    3. Run cppcheck with the following options: cppcheck --clang=clang --project=compile_commands.json --enable=all > err.txt 2>&1
    where clang --version returns 16.0.6

    The process started and the last line in err.txt is the following:
    5/2898 files checked 0% done
    Checking arch/x86/boot/compressed/cpuflags.c...

    Then the segmentation fault happened.

    Before I start analyzing core dumps, I would like to know if my setup is just wrong. If so, I would like to know if someone runs cppcheck on the Linux kernel and how. I am fine with any other setup that works.

     

    Last edit: Javier Carrasco 2024-05-05
  • Oliver Stöneberg

    No matter the setup it should not crash.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.