From: Paul Eggert Date: Wed, 22 Jan 2020 01:59:10 +0000 (-0800) Subject: regex: fix bug with >=16 subexpressions X-Git-Tag: v1.0~4330 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=24d438e5e579478a4c4d4fece2f10a68a1836268;p=gnulib.git regex: fix bug with >=16 subexpressions * lib/regex_internal.h (struct re_backref_cache_entry): Use bitset_word_t as the type of eps_reachable_subexps_map, instead of unsigned short int. This fixes a bug I introduced to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit 2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302). Remove unused member 'unused'. --- diff --git a/ChangeLog b/ChangeLog index df8d996c26..2336126b09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2020-01-21 Paul Eggert + regex: fix bug with >=16 subexpressions + * lib/regex_internal.h (struct re_backref_cache_entry): + Use bitset_word_t as the type of eps_reachable_subexps_map, + instead of unsigned short int. This fixes a bug I introduced + to glibc in 2005-09-28T17:33:18Z!drepper@redhat.com (glibc commit + 2c05d33f90861d074dc12808dafbde30f487b1a0, BZ #1302). + Remove unused member 'unused'. + regex: simplify definition of BITSET_WORD_BITS * config/srclist.txt: Remove regex.c, regex_internal.h temporarily. * lib/regex.c (__STDC_WANT_IEC_60559_BFP_EXT__): Define. diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 30e921fefb..13e15e21ec 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -573,9 +573,8 @@ struct re_backref_cache_entry Idx str_idx; Idx subexp_from; Idx subexp_to; + bitset_word_t eps_reachable_subexps_map; char more; - char unused; - unsigned short int eps_reachable_subexps_map; }; typedef struct