diff options
Diffstat (limited to 'm4/regex.m4')
-rw-r--r-- | m4/regex.m4 | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/m4/regex.m4 b/m4/regex.m4 index 055d71b..35119c5 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,6 +1,6 @@ -# serial 67 +# serial 68 -# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -213,6 +213,17 @@ AC_DEFUN([gl_REGEX], if (! REG_STARTEND) result |= 64; + /* Matching with the compiled form of this regexp would provoke + an assertion failure prior to glibc-2.28: + regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed + With glibc-2.28, compilation fails and reports the invalid + back reference. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + if (!s || strcmp (s, "Invalid back reference")) + result |= 64; + #if 0 /* It would be nice to reject hosts whose regoff_t values are too narrow (including glibc on hosts with 64-bit ptrdiff_t and |