Bug 24474 - StackOverflowError in reflexive expressions
Summary: StackOverflowError in reflexive expressions
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: gjdoc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Julian Scheid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-21 13:56 UTC by Stephan Michels
Modified: 2005-10-22 12:41 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Full stacktrace of the exception. (5.63 KB, text/plain)
2005-10-21 13:57 UTC, Stephan Michels
Details
Simple testcase to reproduce the exception (141 bytes, text/plain)
2005-10-21 13:58 UTC, Stephan Michels
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Michels 2005-10-21 13:56:02 UTC
Hi,
I found another bug in gjdoc if try to create the javadocs for eclipse, which caused java.lang.StackOverflowError or a segfault for gcj.
Comment 1 Stephan Michels 2005-10-21 13:57:23 UTC
Created attachment 10039 [details]
Full stacktrace of the exception.
Comment 2 Stephan Michels 2005-10-21 13:58:28 UTC
Created attachment 10040 [details]
Simple testcase to reproduce the exception
Comment 3 Andrew Pinski 2005-10-21 14:06:26 UTC
Just people don't start filing duplicate bugs, the segfault for gcj instead of a StackOverflowError is recorded as PR 1373.
Comment 4 Stephan Michels 2005-10-21 14:39:36 UTC
I also filed a bug report for eclipse, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=113357
Comment 5 Julian Scheid 2005-10-22 12:41:54 UTC
Fixed.  The fix also covers the case when more than one field participates in the circularity, for example A=B, B=A.
Comment 6 cvs-commit@developer.classpath.org 2005-10-22 12:53:57 UTC
Subject: Bug 24474

CVSROOT:	/cvsroot/classpath
Module name:	gjdoc
Branch: 	
Changes by:	Julian Scheid <julian@savannah.gnu.org>	05/10/22 12:38:50

Modified files:
	src/gnu/classpath/tools/gjdoc/expr: IdentifierExpression.java 
	                                    EvaluatorEnvironment.java 
	                                    Evaluator.java Context.java 
	src/gnu/classpath/tools/gjdoc: FieldDocImpl.java 
	                               ClassDocImpl.java 
	.              : Makefile.am ChangeLog 
Added files:
	src/gnu/classpath/tools/gjdoc/expr: 
	                                    CircularExpressionException.java 

Log message:
	2005-10-22  Julian Scheid  <julian@sektor37.de>
	
	PR gjdoc/24474:
	* Makefile.am: added new class CircularExpressionException.
	
	* src/gnu/classpath/tools/gjdoc/ClassDocImpl.java
	(findFieldValue): add new parameter for set of visited fields,
	throw CircularExpressionException if inspected field has already
	been visited.  Use new constantValue(Set) variant in FieldDocImpl.
	(getValue): add new parameter for set of visited fields.
	
	* src/gnu/classpath/tools/gjdoc/FieldDocImpl.java:
	(constantValue): new variant which accepts set of visited fields.
	
	* src/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java:
	added.
	
	* src/gnu/classpath/tools/gjdoc/expr/Context.java: add new field
	visitedFields.
	
	* src/gnu/classpath/tools/gjdoc/expr/Evaluator.java (evaluate):
	add new parameter for set of visited fields, pass parameter to
	Context constructor.
	
	* src/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java
	(getValue): add new parameter for set of visited fields.
	
	* src/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java
	(evaluate): pass set of visited fields to
	EvaluatorEnvironment.getValue(), more details for thrown
	IllegalExpressionException.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/expr/Evaluator.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/expr/Context.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/FieldDocImpl.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/src/gnu/classpath/tools/gjdoc/ClassDocImpl.java.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/Makefile.am.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/gjdoc/ChangeLog.diff?tr1=1.233&tr2=1.234&r1=text&r2=text



_______________________________________________
Cp-tools-commit mailing list
Cp-tools-commit@gnu.org
http://lists.gnu.org/mailman/listinfo/cp-tools-commit