This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[testcase] regex hang
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Isamu Hasegawa <isamu at yamato dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 17 Jun 2003 18:22:39 +0200
- Subject: [testcase] regex hang
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
With this testcase, regexec goes very deep recursion from
prune_impossible_nodes -> sift_states_backward and stays that way
until killed.
Could you please look at it? Thanks.
2003-06-17 Jakub Jelinek <jakub@redhat.com>
* posix/bug-regex11.c (tests): Add new test.
--- libc/posix/bug-regex11.c.jj 2002-10-21 13:14:52.000000000 -0400
+++ libc/posix/bug-regex11.c 2003-06-17 12:17:33.000000000 -0400
@@ -1,5 +1,5 @@
/* Regular expression tests.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -41,7 +41,9 @@ struct
{ { 0, 21 }, { 8, 9 }, { 9, 10 } } },
{ "^\\(a*\\)\\1\\{9\\}\\(a\\{0,9\\}\\)\\([0-9]*;.*[^a]\\2\\([0-9]\\)\\)",
"a1;;0a1aa2aaa3aaaa4aaaaa5aaaaaa6aaaaaaa7aaaaaaaa8aaaaaaaaa9aa2aa1a0", 0,
- 5, { { 0, 67 }, { 0, 0 }, { 0, 1 }, { 1, 67 }, { 66, 67 } } }
+ 5, { { 0, 67 }, { 0, 0 }, { 0, 1 }, { 1, 67 }, { 66, 67 } } },
+ { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$",
+ "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } }
};
int
Jakub