Long "in" lists in queries results in a Java stack overflow exception.

Description

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.038 sec <<< FAILURE!
testLongInElementsByHQL(org.hibernate.test.criteria.LongInElementsTest) Time elapsed: 2.561 sec <<< ERROR!
java.lang.StackOverflowError
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:391)
at java.lang.StringBuffer.append(StringBuffer.java:224)
at antlr.BaseAST.toStringList(BaseAST.java:341)
at antlr.BaseAST.toStringList(BaseAST.java:347)
at antlr.BaseAST.toStringList(BaseAST.java:347)
at antlr.BaseAST.toStringList(BaseAST.java:347)
at antlr.BaseAST.toStringList(BaseAST.java:347)
at antlr.BaseAST.toStringList(BaseAST.java:347)
at antlr.BaseAST.toStringList(BaseAST.java:347)
at antlr.BaseAST.toStringList(BaseAST.java:347)

The same as in https://hibernate.onjira.com/browse/HHH-2166 but in 3.6.8, 3.6.9 build.

Environment

Windows 7 x64, apache-maven-3.0.3, downloaded from github sources

Activity

Show:
Pavel Konan
October 17, 2017, 8:15 PM

Almost 6 years passed since it was created! Huraa!

Steve Ebersole
October 17, 2017, 9:06 PM

Thanks for your contribution. Very insightful!

Yes I marked it as ignored because while yes this is a real bug, it:

  1. is (almost) always indicative of a bad query

  2. not something we will fix prior to 6, or at least I am not going to spend my time on it outside of already having addressed it in 6.0's code base.

Really there is nothing more to say here beyond the extensive discussion on the original issue : HHH-1123. The main outcome of the discussions on was to identify concrete use-cases where we deemed it important to allow in some way. For example, this lead to the "load by multiple id" API. Again, the discussion is all on

Gail Badner
October 19, 2017, 11:18 PM

, if it's already addressed in 6.0, is there a jira for that work that could be linked?

Does it make sense to resolve this as "Won't fix"?

Steve Ebersole
October 20, 2017, 2:32 PM

even better, I'll just use this as the Jira for resolution in 6.0

Steve Ebersole
December 6, 2018, 3:43 PM

Preparing Alpha1 release

Assignee

Steve Ebersole

Reporter

Vyacheslav

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure