OOM on Large C Project & Incomplete File Tracing #20181
Replies: 3 comments 1 reply
-
Update: After a closer look at It appears that CodeQL is not tracing the Here's what I found in the log:
This leads me to believe that if the creation of static libraries isn't traced, the extractor might not know which object files are contained within them, and therefore fails to analyze the corresponding source files. Could this be the reason why the contents of Is this expected behavior, or is there a specific configuration required to ensure that |
Beta Was this translation helpful? Give feedback.
-
Hello, let me ask a couple of questions to better clarify your scenario:
|
Beta Was this translation helpful? Give feedback.
-
To followup on @esteffin questions, The CLI will do a scan of all source code to count lines of code before starting the build. This can be suppressed with If you have purchased Github Advanced Security, I recommend that you also reach out to support. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using CodeQL to analyze a very large, private C project and have encountered a couple of issues. I would be grateful for any help or guidance you can provide.
Problem 1: Out-of-Memory (OOM) During Database Creation
When I attempt to create a CodeQL database from the project's root directory, the process fails with an Out-of-Memory (OOM) error. This error occurs before the actual compilation phase begins.
Observations:
--source-root
to a smaller, specific subdirectory that I am interested in.Questions:
Problem 2: Incomplete Tracing for Most Compiled Files
I've noticed that most C files are not being fully analyzed, even though they are part of the compilation.
Observations:
example.c
, is definitely being compiled.build-tracer.log
and can confirm that the CodeQL tracer has captured its compilation process. The log contains the completeinvocation
,Command
, andProcessed command line
forexample.c
.example.c
is its file-level location (example.c:0:0:0:0
). A small number of other files are partially traced, where I can identify some expressions (expr
), but the analysis is still far from complete.For example, running the following query on the database highlights this issue:
The query shows that for files like
example.c
, only the file itself is located, with no deeper elements available.Question:
Beta Was this translation helpful? Give feedback.
All reactions