Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflowException in XLargeTest#test011() #1171

Closed
jarthana opened this issue Jun 20, 2023 · 3 comments · Fixed by #2011
Closed

StackOverflowException in XLargeTest#test011() #1171

jarthana opened this issue Jun 20, 2023 · 3 comments · Fixed by #2011
Assignees

Comments

@jarthana
Copy link
Member

To reproduce this, you need to select the single given test name (by setting TESTS_NAMES at the top).

The SOE happens at BinaryExpression#containsPatternVariable(). The reason it happens is, this method and possibly few others that were added to BinaryExpression were not overridden in CombinedBinaryExpression and therefore fell into the SOE. Just as analyseCode(), we should have for the other methods too that propagate to left and right.

Another note is, perhaps we should limit the call containsPatternVariable() only for compliance >= 16.

@srikanth-sankaran
Copy link
Contributor

To reproduce this, you need to select the single given test name (by setting TESTS_NAMES at the top).

The SOE happens at BinaryExpression#containsPatternVariable(). The reason it happens is, this method and possibly few others that were added to BinaryExpression were not overridden in CombinedBinaryExpression and therefore fell into the SOE. Just as analyseCode(), we should have for the other methods too that propagate to left and right.

Another note is, perhaps we should limit the call containsPatternVariable() only for compliance >= 16.

So curious: why would this show up only when you run a single test ??

@jarthana
Copy link
Member Author

Not sure, but I suspect it could be a timing issue. I also see tests failing when I run them in debug mode and not otherwise.

@srikanth-sankaran
Copy link
Contributor

This problem goes away with #2011 - Much water has flown under the bridge. org.eclipse.jdt.internal.compiler.ast.Statement.containsPatternVariable() is a single visitor based method that answers the question without hierarchy members having to override it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants