Repository navigation
Missing Source Files from Database for XNU #145
Description
Activity
Thanks for your report. @github/codeql-c is this something you can look into, please?
Hi @qu0dy,
Thanks for the report.
Just to confirm: does the build script you linked to allow you to successfully build XNU when invoked by itself? If so, could you provide us with the complete
build-tracer.log? The parts of the log you included do not quite provide sufficient information.I also see you're running a beta version of MacOS Ventura, does the same problem occur with the latest released version of Ventura?
Hi @jketema,
Just to confirm: does the build script you linked to allow you to successfully build XNU when invoked by itself?
Yes, it's.
If so, could you provide us with the complete
build-tracer.log?Here is the log, it's quite large (~70mb).
I also see you're running a beta version of MacOS Ventura, does the same problem occur with the latest released version of Ventura?
Unfortunately I can't test it on stable MacOS version right now.
@jketema the issue resolved when I used:
codeql database create xnu-database --language=cpp --command="./build.sh"Instead of:
codeql database create xnu-database --language=cpp --command="make ARCH_CONFIGS="x86_64" KERNEL_CONFIGS=RELEASE BUILD_WERROR=0".I thought that I have to use it only with the latest step of XNU building.
@jketema the issue resolved when I used:
codeql database create xnu-database --language=cpp --command="./build.sh"Just to confirm: Did you check - using a CodeQL query - that the database actually contains the missing source files?
Instead of:
codeql database create xnu-database --language=cpp --command="make ARCH_CONFIGS="x86_64" KERNEL_CONFIGS=RELEASE BUILD_WERROR=0".I thought that I have to use it only with the latest step of XNU building.
Indeed it should. From the logs I can see that the clang compiler is not properly identified in this case. What is the output of
/applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/clang --versionwhen you run it instead of
codeql database create xnu-database --language=cpp --command="make ARCH_CONFIGS="x86_64" KERNEL_CONFIGS=RELEASE BUILD_WERROR=0"?
Just to confirm: Did you check - using a CodeQL query - that the database actually contains the missing source files?
Yes, it does.
Indeed it should. From the logs I can see that the clang compiler is not properly identified in this case. What is the output of when you run it instead of
Here is a log, which produces correct db.
Hi @qu0dy,
Thanks for the confirmation and the logs. Since you have a workaround, there doesn't seem to be an immediate urgency to get this resolved. So, we'll track this in an internal ticket and revisit this at some later date.
Hi,
Most of the
.cfiles are missing after compilation of XNU in DB.Log entry:
Env: