Bug 18616

Summary: RE.match causes StackOverflow if paren length exceeds 1669 chars
Product: Regexp Reporter: alfonzo alfredo <alfonzoalfredo>
Component: OtherAssignee: Jakarta Notifications Mailing List <notifications>
Status: CLOSED DUPLICATE    
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description alfonzo alfredo 2003-04-02 16:30:25 UTC
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
Comment 1 Vadim Gritsenko 2003-05-02 01:59:55 UTC

*** This bug has been marked as a duplicate of 764 ***