]> Savannah Git Hosting - gnulib.git/commit
dfa: avoid new infinite loop
authorJim Meyering <meyering@fb.com>
Tue, 29 Nov 2016 18:45:46 +0000 (10:45 -0800)
committerJim Meyering <meyering@fb.com>
Tue, 29 Nov 2016 18:57:14 +0000 (10:57 -0800)
commitca3ca77fc9e497ff5048a9f1ee0d1acc8e050f51
treebf7b73f78339a0cc776b753517dc0167721e9ef1
parent9cba42f87e1e88ac746e2341c51e78f9f640fefa
dfa: avoid new infinite loop

This would infloop: echo cx | LC_ALL=C grep -E 'c\b[x ]'
* lib/dfa.c (dfastate): When constructing a new state table, we could
initially declare that we had found a match, and later find that
constraints eliminate that possibility, yet continue to use the
now stale "matched" indicator.  That would lead to an infinite loop.
The solution is to update "matched" when necessary.
Introduced by commit v0.1-983-g403adf1.
ChangeLog
lib/dfa.c