bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.8 - error in expr


From: Paul Eggert
Subject: Re: coreutils-6.8 - error in expr
Date: Tue, 12 Jun 2007 10:45:49 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> That will ensure that you use the regex code bundled with coreutils,
> which may be less buggy than what's in your systems C library.

In the meantime it shouldn't hurt to test for the buggy regexp he
mentioned.  I installed this into gnulib:

2007-06-12  Paul Eggert  <address@hidden>

        * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
        Vin Shelton.

--- m4/regex.m4 6 Jun 2007 18:35:18 -0000       1.65
+++ m4/regex.m4 12 Jun 2007 17:44:33 -0000
@@ -1,4 +1,4 @@
-#serial 46
+#serial 47

 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
 # 2006, 2007 Free Software Foundation, Inc.
@@ -137,6 +137,17 @@ AC_DEFUN([gl_REGEX],
            if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
              return 1;

+           /* Catch a bug reported by Vin Shelton in
+              
http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+              */
+           re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                          & ~RE_CONTEXT_INVALID_DUP
+                          & ~RE_NO_EMPTY_RANGES);
+           memset (&regex, 0, sizeof regex);
+           s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+           if (s)
+             return 1;
+
            /* REG_STARTEND was added to glibc on 2004-01-15.
               Reject older versions.  */
            if (! REG_STARTEND)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]