On 6/6/21 2:45 PM, Dmitry V. Levin wrote:
I've applied it now, and the following follow-up patch:
These recently-installed patches fail for me, which indicates that the
patches aren't correct. Could you please fix this? The test failure is
causing 'make check' to fail for GNU grep.
I tested on Ubuntu 21.04 x86-64 (with its packaged GCC 10.3.0-1ubuntu1),
as follows:
./gnulib-tool --create-testdir --dir foo regex
cd foo
./configure CFLAGS='-g3 -O2 -fsanitize=undefined'
make check
foo/gltests/test-regex.log contains:
regex_internal.c:1317:7: runtime error: execution reached an unreachable
program point
FAIL test-regex (exit status: 1)
The failing line is here:
DEBUG_ASSERT (set->elems[idx - 1] < elem);
I got a similar failure when I configured this way instead:
./configure CFLAGS='-g3 -O2 -DDEBUG'
the only difference being a different diagnostic in test-regex.log:
test-regex: regex_internal.c:1317: re_node_set_insert: Assertion
`set->elems[idx - 1] < elem' failed.
FAIL test-regex (exit status: 134)
The problem is not limited to Ubuntu, as I got a similar failure on
Fedora 34 with its packaged GCC 11.1.1 20210531 (Red Hat 11.1.1-3).