You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm from PVS-Studio LLC. We develop a static analyzer for Java code that uses the Spoon library (we use the 10.3.0 version). Spoon uses org.eclipse.jdt.core 3.32.0 library.
When such code is evaluated via Spoon (a compliance level equal to 17 is used) the org.eclipse.jdt.internal.compiler.ast.Statement class hangs on a method Statement.addPatternVariables(LocalVariableBinding[] current, LocalVariableBinding add).
at org.eclipse.jdt.internal.compiler.ast.Statement.addPatternVariables(Statement.java:522)
at org.eclipse.jdt.internal.compiler.ast.Statement.addPatternVariables(Statement.java:507)
at org.eclipse.jdt.internal.compiler.ast.Statement.addPatternVariablesWhenTrue(Statement.java:495)
at org.eclipse.jdt.internal.compiler.ast.AND_AND_Expression.collectPatternVariablesToScope(AND_AND_Expression.java:284)
at org.eclipse.jdt.internal.compiler.ast.AND_AND_Expression.collectPatternVariablesToScope(AND_AND_Expression.java:281)
at org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.collectPatternVariablesToScope(ConditionalExpression.java:460)
at org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.resolveType(ConditionalExpression.java:535)
at org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.resolveType(ConditionalExpression.java:546)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:390)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:259)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:662)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:388)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:571)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1503)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1628)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:667)
at spoon.support.compiler.jdt.TreeBuilderCompiler.buildUnits(TreeBuilderCompiler.java:105)
at spoon.support.compiler.jdt.JDTBatchCompiler.getUnits(JDTBatchCompiler.java:282)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnits(JDTBasedSpoonCompiler.java:418)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildUnitsAndModel(JDTBasedSpoonCompiler.java:370)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.buildSources(JDTBasedSpoonCompiler.java:336)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:117)
at spoon.support.compiler.jdt.JDTBasedSpoonCompiler.build(JDTBasedSpoonCompiler.java:100)
at spoon.Launcher.buildModel(Launcher.java:782)
at com.pvsstudio.projects.Module.build(Module.java:428)
at com.pvsstudio.runner.ModuleModelBuilder.createModuleWorkerWithBuiltModelAndAnalyzeTasksForModule(ModuleModelBuilder.java:136)
at com.pvsstudio.runner.AnalyzerRunner.run(AnalyzerRunner.java:93)
at com.pvsstudio.Main.main(Main.java:575)
Describe the bug
I'm from PVS-Studio LLC. We develop a static analyzer for Java code that uses the Spoon library (we use the 10.3.0 version). Spoon uses org.eclipse.jdt.core 3.32.0 library.
When such code is evaluated via Spoon (a compliance level equal to 17 is used) the org.eclipse.jdt.internal.compiler.ast.Statement class hangs on a method Statement.addPatternVariables(LocalVariableBinding[] current, LocalVariableBinding add).
We have already created a bug Issue in the Eclipse Core Github repository.
Here is a StackTrace of the hang:
Source code you are trying to analyze/transform
Source code for your Spoon processing
No response
Actual output
No response
Expected output
No response
Spoon Version
10.3.0
JVM Version
JDK 17
What operating system are you using?
Windows, Linux, macOS
The text was updated successfully, but these errors were encountered: