Open cooolie opened 1 year ago
"Just to clarify, the compilation was successful, it's just that many cc files will not appear in the CodeQL database."
D:\chromium\src>codeql database create "D:/codeql/autofill_06172" --language=cpp --command="ninja -j 18 -C out/debug chrome"
Initializing database at D:\codeql\autofill_06172.
Running build command: [ninja, -j, 18, -C, out/debug, chrome]
[2023-06-17 21:09:10] [build-stdout] ninja: Entering directory `out/debug'
[2023-06-17 21:09:10] [build-stdout] [1/14] CXX obj/components/autofill/content/browser/browser/fingerprint.obj
[2023-06-17 21:09:10] [build-stdout] [2/14] CXX obj/components/autofill/content/browser/browser/bad_message.obj
[2023-06-17 21:09:10] [build-stdout] [3/14] CXX obj/components/autofill/content/browser/browser/form_forest.obj
[2023-06-17 21:09:10] [build-stdout] [4/14] CXX obj/components/autofill/content/browser/browser/content_autofill_driver.obj
[2023-06-17 21:09:10] [build-stdout] [5/14] CXX obj/components/autofill/content/browser/browser/content_autofill_router.obj
[2023-06-17 21:09:25] [build-stdout] [6/14] CXX obj/components/autofill/content/browser/browser/content_autofill_client.obj
[2023-06-17 21:09:25] [build-stdout] [7/14] CXX obj/components/autofill/content/browser/browser/autofill_log_router_factory.obj
[2023-06-17 21:09:25] [build-stdout] [8/14] CXX obj/components/autofill/content/browser/browser/content_autofill_driver_factory.obj
[2023-06-17 21:09:25] [build-stdout] [9/14] LIB obj/components/autofill/content/browser/browser.lib
[2023-06-17 21:09:25] [build-stdout] [10/14] LINK(DLL) chrome.dll chrome.dll.lib chrome.dll.pdb
Finalizing database at D:\codeql\autofill_06172.
Successfully created database at D:\codeql\autofill_06172.
The error about "../../third_party/protobuf/src/google/protobuf/arena.h"
look strange and may be related. When the CodeQL extractor.exe
encounters an error it usually carries on and adds the source file to the database anyway, unless there are too many errors.
You said there were many CC files missing. Could you search for a couple of them in the build-tracer.log to see if they are mentioned at all. If they are not mentioned then they are likely not needed by the build process (they may have already been compiled earlier or are part of a different build target). If the files are mentioned in invocation: D:\codeql\bin\...\extractor.exe ...
lines then there should be an explanation usually mentioning a "Catastrophic error".
Attaching the entire build-tracer log to this issue is probably not possible, but if you can attach a snippet with of the log related to the trace of a single CC file that would be great for debugging.
Deleted Obj file list
06/17/2023 09:09 PM 130,359 autofill_log_router_factory.obj
06/17/2023 09:09 PM 687,810 bad_message.obj
06/17/2023 09:09 PM 1,074,288 content_autofill_client.obj
06/17/2023 09:09 PM 2,865,175 content_autofill_driver.obj
06/17/2023 09:09 PM 2,278,732 content_autofill_driver_factory.obj
06/17/2023 09:09 PM 3,592,710 content_autofill_router.obj
06/17/2023 09:09 PM 2,407,846 fingerprint.obj
06/17/2023 09:09 PM 3,270,934 form_forest.obj
Thanks for providing a build-tracer log. I see a couple of things like :
66 errors and 1 catastrophic error detected in the compilation of "../../components/autofill/content/browser/risk/fingerprint.cc".
Compilation aborted.
I think these could explain why some files are missing. I'll pass it on to the team, hopefully they know what is causing the problem.
There may be a fix for your problem in the pre-release version of CodeQL 2.13.4. Could you try if that helps? See: https://github.com/github/codeql-action/releases/tag/codeql-bundle-v2.13.4
build-tracer.log Better than before, but there are still file processing failures, see log
Deleted Obj file list
obj\chrome\browser\ui\ui\manage_passwords_ui_controller.obj
Thanks for the updated log. The log seems to indicate that only one file was compiled, not the 8 from https://github.com/github/codeql/issues/13489#issuecomment-1595769249. Is that correct?
yes, i only delete one obj file (obj\chrome\browser\ui\ui\manage_passwords_ui_controller.obj)
Can you delete all the relevant object files and re-try and share the log. Currently I cannot judge how severe the problem is.
Deleted Obj file list
obj\chrome\browser\ui\ui\*.obj
CodeQL C++ extractor: Current location: ../../chrome/browser/ui/passwords/manage_passwords_ui_controller.cc:152317,5
CodeQL C++ extractor: Current physical location: ../../base/compiler_specific.h:104,5
"../../base/compiler_specific.h", line 104: internal error: assertion failed: macro_invocation: unknown special predefined macro (macro.c, line 7359 in macro_invocation)
#if HAS_CPP_ATTRIBUTE(no_unique_address)
^
[E 16:25:08 17016] Warning[extractor-c++]: In construct_message: "../../base/compiler_specific.h", line 104: internal error: assertion failed: macro_invocation: unknown special predefined macro (macro.c, line 7359 in macro_invocation)
#if HAS_CPP_ATTRIBUTE(no_unique_address)
^
3 errors and 1 catastrophic error detected in the compilation of "../../chrome/browser/ui/passwords/manage_passwords_ui_controller.cc".
Compilation aborted.
Thanks for the complete log. I cannot easily reproduce this. I'll add this problem to our internal tracking issue for these kinds of problems, but I cannot promise this will be solved any time soon.
Reproduce step: Guided by this article https://chromium.googlesource.com/chromium/src/+/HEAD/docs/windows_build_instructions.md
build args.gn
gn help buildargs
.is_component_build = true enable_nacl = false target_cpu = "x64" blink_symbol_level = 2 v8_symbol_level = 2 symbol_level = 2
delete obj in obj\chrome\browser\ui\ui*.obj
codeql database create "D:/codeql/test" --language=cpp --command="ninja -j 18 -C out/debug chrome"
Thanks. I'm fully aware how to build Chromium. This doesn't mean it's easy to create a test case that reproduces the problem.
According to the method mentioned here, i removed \out\debug\obj\components\autofill