NodeTraverser is not SOE-safe

Description

org.hibernate.hql.ast.util.NodeTraverser
It is possible for java.lang.StackOverflowError to occur in NodeTraverser.java:41;42 with very deep tree. Need another algorith to visit whole tree.

08.08 19:50:09 ERROR [ArpSiteServlet] Servlet.service() for servlet ArpSiteServlet threw exception
java.lang.StackOverflowError
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)

Environment

None

Activity

Show:
Geoffrey De Smet
December 23, 2008, 4:09 PM

Encountered this bug in hibernate-core 3.3.1.GA
Strange this is that it doesn't occuring during debugging.

Laurent Delaforge
March 19, 2009, 3:33 PM

I don't understand why this issue is a "Minor Improvement" while the duplicate issue is a "Major Bug".
It would be a good idea to blend the duplicate.

In my humble opinion it is a bug, not an improvement.
Minor or major, I am not able to say

Strong Liu
November 16, 2009, 6:37 AM

duplicated by HHH-2166, if you have a test case, please attach it, thanks

Benjamin Truitt
February 6, 2010, 1:39 AM

I see that this issue is resolved in trunk and in the 3.3.1 branch, but if you download 3.3.1.GA, it is not resolved in the source bundled in that download.

This is also true for hibernate 3.3.2.GA.

However, the issue does appear to be resolved in 3.5.0-Beta-4.

Here are the download links I am referring to:
http://sourceforge.net/projects/hibernate/files/

I'm confused about why this fix isn't included in 3.3.1. Is there any reason I shouldn't download the source for 3.3.1, replace the source code for this file with the latest version from trunk, and rebuild?

Thanks.

Steve Ebersole
March 21, 2011, 7:09 PM

Bulk closing stale resolved issues

Assignee

Strong Liu

Reporter

Sergey Vladimirov

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure