Bug 513427 - OutOfMemoryError while indexing clang testsuite
Summary: OutOfMemoryError while indexing clang testsuite
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-09 20:29 EST by EPP Error Reports CLA
Modified: 2020-09-04 15:24 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2017-03-09 20:29:11 EST
The following problem was reported via the automated error reporting:

Message: Error while parsing /nova/nova_root/external/clang/INPUTS/macro_pounder_fn.c.
java.lang.OutOfMemoryError: Java heap space
    at org.eclipse.cdt.core.parser.util.CharArrayMap.get(CharArrayMap.java:213)
    at org.eclipse.cdt.internal.core.parser.scanner.MacroExpander.expandAll(MacroExpander.java:366)
    at org.eclipse.cdt.internal.core.parser.scanner.MacroExpander.expand(MacroExpander.java:187)
    at org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor.expandMacro(CPreprocessor.java:2033)
    at org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor.internalFetchToken(CPreprocessor.java:953)
    at org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor.fetchToken(CPreprocessor.java:641)
    at org.eclipse.cdt.internal.core.parser.scanner.CPreprocessor.nextToken(CPreprocessor.java:738)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.fetchToken(AbstractGNUSourceCodeParser.java:283)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.nextToken(AbstractGNUSourceCodeParser.java:307)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.acceptInactiveCodeBoundary(AbstractGNUSourceCodeParser.java:368)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.declarationList(AbstractGNUSourceCodeParser.java:1343)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parseTranslationUnit(AbstractGNUSourceCodeParser.java:1316)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.translationUnit(AbstractGNUSourceCodeParser.java:1311)
    at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parse(AbstractGNUSourceCodeParser.java:664)
    at org.eclipse.cdt.core.dom.parser.AbstractCLikeLanguage.getASTTranslationUnit(AbstractCLikeLanguage.java:167)
    at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.createAST(AbstractIndexerTask.java:1242)
    at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseFile(AbstractIndexerTask.java:1096)
    at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseLinkage(AbstractIndexerTask.java:899)
    at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.runTask(AbstractIndexerTask.java:560)
    at org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask.run(PDOMIndexerTask.java:161)
    at org.eclipse.cdt.internal.core.pdom.indexer.PDOMUpdateTask.run(PDOMUpdateTask.java:94)
    at org.eclipse.cdt.internal.core.pdom.PDOMIndexerJob.run(PDOMIndexerJob.java:155)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



Bundles:
| org.eclipse.cdt.core | 6.2.0.201612061315 | 6.2.0.201612061315 |
| org.eclipse.core.jobs | 3.8.0.v20160509-0411 | 3.8.0.v20160509-0411 |

Operating Systems:
| Linux | 4.4.0 | 4.4.0 |


The above information is a snapshot of the collected data. Visit https://dev.eclipse.org/recommenders/committers/aeri/v2/#!/problems/58b88204e4b0bd7519883dac for the latest data.

Thank you for your assistance.
 Your friendly error-reports-inbox.
Comment 1 Nathan Ridge CLA 2017-03-09 20:32:14 EST
Note that the input file triggering this OOM is "clang/INPUTS/macro_pounder_fn.c", which is a file in clang's test suite that's designed to stress-test clang's preprocessor.

As I've stated in bug 419652 comment 7, CDT can't handle clang's test suite, and isn't going to any time soon.

If you're using CDT to work on clang code, I highly recommend that you exclude all files belonging to clang's test suite from your project.