[PATCH] Fix regex locking.
Carlos O'Donell
carlos@systemhalted.org
Tue Jun 28 03:19:00 GMT 2005
libc-alpha,
The lock should be initialized after init_dfa, since this function
memset's the entire dfa structure to zero including the lock.
This fixes 2 regex regressions on hppa.
Jakub, did you want to just have __libc_lock_init as part of init_dfa?
c.
2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
* posix/regcomp.c (re_compile_internal): __libc_lock_init
after init_dfa.
Index: posix/regcomp.c
===================================================================
RCS file: /cvs/glibc/libc/posix/regcomp.c,v
retrieving revision 1.95
diff -u -p -r1.95 regcomp.c
--- posix/regcomp.c 6 May 2005 23:33:52 -0000 1.95
+++ posix/regcomp.c 26 Jun 2005 23:37:00 -0000
@@ -774,9 +774,9 @@ re_compile_internal (preg, pattern, leng
}
preg->used = sizeof (re_dfa_t);
- __libc_lock_init (dfa->lock);
-
err = init_dfa (dfa, length);
+ __libc_lock_init (dfa->lock);
+
if (BE (err != REG_NOERROR, 0))
{
free_dfa_content (dfa);
More information about the Libc-alpha
mailing list