Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] JVM crash when trying to JIT compile CPPVisitor.createType

Sometimes when I change the active build configuration from the project's main menu " Build configuration -> Manage..." I have a JVM crash. 

I tried with different version of Oracle Java and it happens with all JVM version - 1.6.0_14 or higher. 

The messages is in the hs_err*.log file is: 


... 
Current thread (0x34031400):  JavaThread "C1 CompilerThread0" daemon [_thread_in_native, id=6612, stack(0x349e0000,0x34a30000)]
...
Current CompileTask:
C1: 161984 7294             org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor::createType (584 bytes)
...


Looks to me that is it some kind of JVM bug that under certain conditions chokes while compile the method

org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor
	public static IType createType(IASTDeclarator declarator)


The method looks rather long, compared to the other methods of the class so I tried splitting it in three part. 
The experiment worked! The JVM crash doesn't happen if the method is split in few parts. 


I found references to JVM crashes "C1 CompilerThread0" that have been existing in different JVM versions and still exist. 


The JVM crash only happens with specific projects - it looks it is very sensitive on what header files are being parsed. 



Questions: 

1. Has anyone experienced or heard of similar JVM crashes "C1 CompilerThread0" using Eclipse? 

2. Considering Eclipse/CDT does not have control over which version of Java is being used on the user's machine, does it make sense to refactor the code inside CPPVisitor.createType(IASTDeclarator) so it doesn't trigger the JVM crash? 



I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=360855 to tack this. 

Thanks
Dobrin



Back to the top