[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug xml/29047] StackOverflowError when parsing large XML file with vali
From: |
kaz at maczuka dot gcd dot org |
Subject: |
[Bug xml/29047] StackOverflowError when parsing large XML file with validation turned on |
Date: |
18 Sep 2006 11:16:53 -0000 |
------- Comment #3 from kaz at maczuka dot gcd dot org 2006-09-18 11:16 -------
I have confirmed that this problem is caused by the regex engine.
Running the following simple program with the command like
"java L 3000" will show the problem:
import java.util.regex.*;
public class L {
public static void main(String[] args) throws Exception {
Pattern p = Pattern.compile("(b)+");
int n = Integer.parseInt(args[0]);
StringBuffer sb = new StringBuffer();
for (int i = 0; i < n; i++) {
sb.append("b");
}
Matcher m = p.matcher(sb);
m.matches();
}
}
gnu.java.util.regex.RETokenRepeated uses a recursive call to find
a match, and the longer the match is, the deeper the recursive call
goes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29047
- [Bug xml/29047] New: StackOverflowError when parsing large XML file with validation turned on, elias at oddlabs dot com, 2006/09/12
- [Bug xml/29047] StackOverflowError when parsing large XML file with validation turned on, elias at oddlabs dot com, 2006/09/12
- [Bug xml/29047] StackOverflowError when parsing large XML file with validation turned on, dog at gnu dot org, 2006/09/16
- [Bug xml/29047] StackOverflowError when parsing large XML file with validation turned on,
kaz at maczuka dot gcd dot org <=
- [Bug classpath/29047] StackOverflowError by address@hidden, kaz at maczuka dot gcd dot org, 2006/09/18
- [Bug classpath/29047] StackOverflowError by gnu.java.util.RETokenRepeated, cvs-commit at developer dot classpath dot org, 2006/09/22
- [Bug classpath/29047] StackOverflowError by gnu.java.util.regex.RETokenRepeated, kaz at maczuka dot gcd dot org, 2006/09/22
- [Bug classpath/29047] StackOverflowError by gnu.java.util.regex.RETokenRepeated, elias at oddlabs dot com, 2006/09/23