github / github/codeql-cli-binaries

Missing Source Files from Database for XNU

Open
#145 7 comments 0 reactions 0 assignees View on GitHub
CLI
Dominant language
No language data
Stars
1k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

Hi,

Most of the `.c` files are missing after compilation of XNU in DB.

### Log entry:
```
/opt/homebrew/Caskroom/codeql/2.11.4/codeql/cpp/tools/osx64/extractor --trapfolder /private/tmp/xnu/build-xnu-xnu-8792.41.9/xnu-xnu-8792.41.9/xnu-database/trap/cpp --src_archive /private/tmp/xnu/build-xnu-xnu-8792.41.9/xnu-xnu-8792.41.9/xnu-database/src --mimic_config /private/tmp/xnu/build-xnu-xnu-8792.41.9/xnu-xnu-8792.41.9/xnu-database/working/compiler_mimic_cache/0bf1e9bd38ad --executable_filename /private/tmp/xnu/build-xnu-xnu-8792.41.9/xnu-xnu-8792.41.9/BUILD/obj/SETUP/installfile/installfile.o -w --error_limit 1000 --disable_system_macros --variadic_macros --gcc --gnu_version 40000 --clang --isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -I/tmp/xnu/build-xnu-xnu-8792.41.9/xnu-xnu-8792.41.9/SETUP/installfile/ -I. --blocks -D__GCC_HAVE_DWARF2_CFI_ASM=1 -- installfile.c /tmp/xnu/build-xnu-xnu-8792.41.9/xnu-xnu-8792.41.9/SETUP/installfile/installfile.c

[E 02:03:00 36601] Warning[extractor-c++]: In construct_message: Catastrophic error: cannot open source file "installfile.c"
```

### Env:
* Builder script: https://gist.github.com/qu0dy/57145e3ca850536169566c1560fd23cd
* XNU: https://github.com/apple-oss-distributions/xnu/releases/tag/xnu-8792.41.9
* OS: MacOS Ventura 13.1 Beta 4
* Clang: 14.0.0
* CodeQL: 2.11.4
* CPU: M1 Pro

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the XNU xnu-8792.41.9 build with the linked builder script and review the CodeQL extractor invocation for installfile.c. Investigate why the source archive does not contain the compiled .c files or why the extractor cannot open them. Done means the affected source files are present in the database without the reported catastrophic error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.