From ed7a53c457ad60d773ccac910ed20c8d9931fb54 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 2 Apr 2004 18:35:55 +0000 Subject: Some nasty test cases involving back references that caused unbounded recursion. --- regress/lib/libc/regex/tests | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'regress/lib/libc') diff --git a/regress/lib/libc/regex/tests b/regress/lib/libc/regex/tests index c89b9ec164c..3c1a51f8b4f 100644 --- a/regress/lib/libc/regex/tests +++ b/regress/lib/libc/regex/tests @@ -1,4 +1,4 @@ -# $OpenBSD: tests,v 1.2 2001/01/29 02:05:44 niklas Exp $ +# $OpenBSD: tests,v 1.3 2004/04/02 18:35:54 otto Exp $ # $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $ # regular expression test set @@ -169,6 +169,10 @@ a\(\(b\)*\2\)*d b abbbd abbbd \(a\)\1bc*d b aabcccd aabcccd \(a\)\1bc*[ce]d b aabcccd aabcccd ^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd +\(b*\)\(a*\1\)* b ab "" +\([^_]*\)\(_*\1\)* b foo_foo_bar_bar_bar_baz foo_foo foo,_foo +\([^_]*\)\(_*\1\)* b bar_bar_bar_baz bar_bar_bar bar,_bar +\([^_]*\)\(_*\1\)* b foo_bar_baz foo foo # ordinary repetitions ab*c & abc abc @@ -476,3 +480,4 @@ CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a - CC11 CC11 Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz a?b - ab ab -\{0,1\}[0-9]*$ b -5 -5 + -- cgit v1.2.3