Open
Description
Description of the issue
I noticed that several files of the linux kernel source were missing when creatiung a database with code ql using the kernel config attached to this issue and the following command:
codeql database create ~/codeql_db/linux/linux_db --language c --command "make -j`nproc`"
One of the missing files (kernel/bpf/verifier.c) is being correctly compiled by the kernel build system but it seems there are multiple compilation errors when the cpp extractor runs (I attached to complete log to this issue), for example:
E 15:08:35 2293019] Warning[extractor-c++]: In construct_text_message: "./arch/x86/include/asm/processor.h", line 525: error: expected a ")"
this_cpu_write(cpu_tss_rw.x86_tss.sp0, sp0);
Please note:
- I have verified the subsystem where that this file belongs to (CONFIG_BPF) is enabled and the feature works when running the kernel
- I have attempted to create a database in multiple computers, some of them with a fresh install of debian, and the issue always reproduces
- verifier.c is just an example, there are many many other missing files due to similar reasons
- The code compiles just fine for the kernel
- I compiled an unmodified checkout of https://github.com/torvalds/linux
I believe this might be a bug in the extractor similar to #16901 and #13994. If that is so, please feel free to close this as duplicate.
Let me know if you need anything else from me to reproduce this
extractor_log.txt
config.txt
Activity