- Notifications
You must be signed in to change notification settings - Fork1.9k
OOM on Large C Project & Incomplete File Tracing#20181
-
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 CreationWhen 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 occursbefore the actual compilation phase begins. Observations:
Questions:
Problem 2: Incomplete Tracing for Most Compiled FilesI've noticed that most C files are not being fully analyzed, even though they are part of the compilation. Observations:
For example, running the following query on the database highlights this issue: fromLocatablelocb,Locationlocwherelocb.getLocation()=locselectlocb,loc The query shows that for files like Question:
|
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 3 comments 2 replies
-
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 |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hello, let me ask a couple of questions to better clarify your scenario:
|
BetaWas this translation helpful?Give feedback.
All reactions
-
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. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for the suggestion! Using However, Problem 2 is still a major blocker. I've analyzed the and There are many other variations as well, such as These error messages seem to correspond directly to the fromLocatablelocb,Locationlocwherelocb.getLocation()=locselectlocb,loc For instance, one of the results is The log file containing these extractor warnings is about 1.7G in size. This leads me to a question: is it possible that the CodeQL C++ extractor is failing to parse the syntax correctly? This is strange because my project compiles successfully using the specified build command. Any insights on why the extractor would report so many syntax errors on a codebase that compiles cleanly would be greatly appreciated. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Happy to hear that the first part got resolved. |
BetaWas this translation helpful?Give feedback.