You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Carlo Marchiori (JIRA)" <xa...@xml.apache.org> on 2004/11/15 15:21:23 UTC
[jira] Created: (XALANJ-1991) StackOverflowException comparing two strings
StackOverflowException comparing two strings
--------------------------------------------
Key: XALANJ-1991
URL: http://nagoya.apache.org/jira/browse/XALANJ-1991
Project: XalanJ2
Type: Bug
Components: Xalan
Versions: 2.4, 2.5Dx, 2.5, 2.6
Environment: Any
Reporter: Carlo Marchiori
java.lang.StackOverflowError
at org.apache.xpath.objects.XStringForChars.hasString(XStringForChars.java:97)
at org.apache.xpath.objects.XString.equals(XString.java:401)
at org.apache.xpath.objects.XString.equals(XString.java:402)
at org.apache.xpath.objects.XString.equals(XString.java:402)
at org.apache.xpath.objects.XString.equals(XString.java:402)
at org.apache.xpath.objects.XString.equals(XString.java:402)
.......
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Resolved: (XALANJ-1991) StackOverflowException comparing two
strings
Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XALANJ-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henry Zongaro resolved XALANJ-1991.
-----------------------------------
Resolution: Duplicate
This appears to be the same as the problem described in Jira issue XALANJ-1243. The patch attached to that bug report appears to resolve this issue.
> StackOverflowException comparing two strings
> --------------------------------------------
>
> Key: XALANJ-1991
> URL: https://issues.apache.org/jira/browse/XALANJ-1991
> Project: XalanJ2
> Issue Type: Bug
> Components: Xalan, XPath
> Affects Versions: 2.6
> Environment: Any
> Reporter: Carlo Marchiori
> Attachments: XALANJ-1991-usecase.zip
>
>
> java.lang.StackOverflowError
> at org.apache.xpath.objects.XStringForChars.hasString(XStringForChars.java:97)
> at org.apache.xpath.objects.XString.equals(XString.java:401)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> .......
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANJ-1991) StackOverflowException comparing two strings
Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
[ http://nagoya.apache.org/jira/browse/XALANJ-1991?page=history ]
Brian Minchau updated XALANJ-1991:
----------------------------------
Component: XPath
> StackOverflowException comparing two strings
> --------------------------------------------
>
> Key: XALANJ-1991
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1991
> Project: XalanJ2
> Type: Bug
> Components: Xalan, XPath
> Versions: 2.4, 2.5Dx, 2.5, 2.6
> Environment: Any
> Reporter: Carlo Marchiori
> Attachments: XALANJ-1991-usecase.zip
>
> java.lang.StackOverflowError
> at org.apache.xpath.objects.XStringForChars.hasString(XStringForChars.java:97)
> at org.apache.xpath.objects.XString.equals(XString.java:401)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> .......
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Updated: (XALANJ-1991) StackOverflowException comparing two strings
Posted by "Carlo Marchiori (JIRA)" <xa...@xml.apache.org>.
[ http://nagoya.apache.org/jira/browse/XALANJ-1991?page=history ]
Carlo Marchiori updated XALANJ-1991:
------------------------------------
Attachment: XALANJ-1991-usecase.zip
Example to recreate the problem.
> StackOverflowException comparing two strings
> --------------------------------------------
>
> Key: XALANJ-1991
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1991
> Project: XalanJ2
> Type: Bug
> Components: Xalan
> Versions: 2.4, 2.5Dx, 2.5, 2.6
> Environment: Any
> Reporter: Carlo Marchiori
> Attachments: XALANJ-1991-usecase.zip
>
> java.lang.StackOverflowError
> at org.apache.xpath.objects.XStringForChars.hasString(XStringForChars.java:97)
> at org.apache.xpath.objects.XString.equals(XString.java:401)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> .......
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-1991) StackOverflowException comparing
two strings
Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XALANJ-1991?page=comments#action_12459660 ]
Henry Zongaro commented on XALANJ-1991:
---------------------------------------
I just happened to notice that all four of these issues (XALANJ-1243, XALANJ-1880, XALANJ-1991 and XALANJ-2001) appear to be related to one another because they all seem to describe the same problem with XString.equals, but I haven't investigated further to be certain of that, so I just thought I'd provide that information. XALANJ-2001 contains a patch that avoids the problem, but I didn't like the patch at the same, so it's never been applied.
> StackOverflowException comparing two strings
> --------------------------------------------
>
> Key: XALANJ-1991
> URL: http://issues.apache.org/jira/browse/XALANJ-1991
> Project: XalanJ2
> Issue Type: Bug
> Components: XPath, Xalan
> Affects Versions: 2.6
> Environment: Any
> Reporter: Carlo Marchiori
> Attachments: XALANJ-1991-usecase.zip
>
>
> java.lang.StackOverflowError
> at org.apache.xpath.objects.XStringForChars.hasString(XStringForChars.java:97)
> at org.apache.xpath.objects.XString.equals(XString.java:401)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> .......
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org
[jira] Commented: (XALANJ-1991) StackOverflowException comparing two strings
Posted by "Carlo Marchiori (JIRA)" <xa...@xml.apache.org>.
[ http://nagoya.apache.org/jira/browse/XALANJ-1991?page=comments#action_55497 ]
Carlo Marchiori commented on XALANJ-1991:
-----------------------------------------
Proposed fix.
The problem is with the class org.apache.xpath.objects.XMLString
and in particular with the method
---------------------------------------
public boolean equals(XMLString obj2)
{
if (!obj2.hasString())
return obj2.equals(this);
else
return str().equals(obj2.toString());
}
-------------------------------------------
When both obj2 and this return false on 'hasString' and infinite loop occurs. So
my proposed fix is
----------------------------------
public boolean equals(XMLString obj2)
{
// if (!obj2.hasString())
if (!obj2.hasString() && this.hasString())
return obj2.equals(this);
else
return str().equals(obj2.toString());
}
-------------------------------------
> StackOverflowException comparing two strings
> --------------------------------------------
>
> Key: XALANJ-1991
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1991
> Project: XalanJ2
> Type: Bug
> Components: Xalan
> Versions: 2.4, 2.5Dx, 2.5, 2.6
> Environment: Any
> Reporter: Carlo Marchiori
> Attachments: XALANJ-1991-usecase.zip
>
> java.lang.StackOverflowError
> at org.apache.xpath.objects.XStringForChars.hasString(XStringForChars.java:97)
> at org.apache.xpath.objects.XString.equals(XString.java:401)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> at org.apache.xpath.objects.XString.equals(XString.java:402)
> .......
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org