1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-06-06 11:41:02 +03:00
2003-11-26  Jakub Jelinek  <jakub@redhat.com>

	* posix/regexec.c (check_subexp_limits): Only check close
	subexpression limitation if one is found.  Formatting.
	(sift_states_backward, check_arrival, check_arrival_add_next_nodes):
	Formatting.
	* posix/bug-regex11.c (tests): Enable most #ifdefed out tests.
	Add new test.
This commit is contained in:
Ulrich Drepper 2003-11-27 05:32:46 +00:00
parent 5cb48b8492
commit 46bf9de7b1
4 changed files with 50 additions and 27 deletions

View File

@ -1,3 +1,12 @@
2003-11-26 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (check_subexp_limits): Only check close
subexpression limitation if one is found. Formatting.
(sift_states_backward, check_arrival, check_arrival_add_next_nodes):
Formatting.
* posix/bug-regex11.c (tests): Enable most #ifdefed out tests.
Add new test.
2003-11-26 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/kernel-features.h

View File

@ -1,3 +1,11 @@
2003-11-27 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
* pthread_attr_destroy.c: Include shlib-compat.h.
(__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
is set in iattr->flags.
* pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2003-11-21 Jakub Jelinek <jakub@redhat.com>
* Makefile (distribute): Add tst-cleanup4aux.c.

View File

@ -63,14 +63,16 @@ struct
{ "()(b)c\\2", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 0 }, { 0, 1 } } },
{ "a(b)()c\\1", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 2 }, { 2, 2 } } },
{ "a()(b)c\\2", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 1 }, { 1, 2 } } },
#if 0
/* XXX Not used since they fail so far. */
{ "()(b)\\1c\\2", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 0 }, { 0, 1 } } },
{ "(b())\\2\\1", "bbbb", REG_EXTENDED, 3, { { 0, 2 }, { 0, 1 }, { 1, 1 } } },
{ "a()(b)\\1c\\2", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 1 }, { 1, 2 } } },
{ "a()d(b)\\1c\\2", "adbcb", REG_EXTENDED, 3, { { 0, 5 }, { 1, 1 }, { 2, 3 } } },
{ "a(b())\\2\\1", "abbbb", REG_EXTENDED, 3, { { 0, 3 }, { 1, 2 }, { 2, 2 } } },
{ "(bb())\\2\\1", "bbbb", REG_EXTENDED, 3, { { 0, 4 }, { 0, 2 }, { 2, 2 } } },
{ "^(.?)(.?)(.?)(.?)(.?).?\\5\\4\\3\\2\\1$",
"level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
#if 0
/* XXX Not used since they fail so far. */
{ "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$",
"level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
#endif

View File

@ -1854,12 +1854,16 @@ check_subexp_limits (dfa, dest_nodes, candidates, limits, bkref_ents, str_idx)
if (BE (err != REG_NOERROR, 0))
return err;
}
/* Check the limitation of the close subexpression. */
if (cls_node >= 0)
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
int node = dest_nodes->elems[node_idx];
if (!re_node_set_contains (dfa->inveclosures + node, cls_node)
&& !re_node_set_contains (dfa->eclosures + node, cls_node))
if (!re_node_set_contains (dfa->inveclosures + node,
cls_node)
&& !re_node_set_contains (dfa->eclosures + node,
cls_node))
{
/* It is against this limitation.
Remove it form the current sifted state. */