You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by bu...@apache.org on 2003/04/02 18:30:26 UTC
DO NOT REPLY [Bug 18616] New: -
RE.match causes StackOverflow if paren length exceeds 1669 chars
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18616>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18616
RE.match causes StackOverflow if paren length exceeds 1669 chars
Summary: RE.match causes StackOverflow if paren length exceeds
1669 chars
Product: Regexp
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Other
AssignedTo: regexp-dev@jakarta.apache.org
ReportedBy: alfonzoalfredo@hotmail.com
If re.match is called in a situation where a paren would exceed 1669 chars,
this happens:
java.lang.StackOverflowError
at org.apache.regexp.RE.matchNodes(RE.java:1376)
------ Example code (simplified): ------
// longPhrase.length() > 1669
String text = "long phrase: begin " + longPhrase + " end";
RE r = new RE("begin (.+) end");
if (!r.match(text)) return null;
// calling r.match throws exception
---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org