pgsql: Fix infinite-loop risk in fixempties() stage of regex compilatio

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix infinite-loop risk in fixempties() stage of regex compilatio
Дата
Msg-id E1UDe2x-0000fa-NY@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix infinite-loop risk in fixempties() stage of regex compilation.

The previous coding of this function could get into situations where it
would never terminate, because successive passes would re-add EMPTY arcs
that had been removed by the previous pass.  Rewrite the function
completely using a new algorithm that is guaranteed to terminate, and
also seems to be usually faster than the old one.  Per Tcl bugs 3604074
and 3606683.

Tom Lane and Don Porter

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a7b61d4f5af37344f8973b2dfce47e2ba2680061

Modified Files
--------------
src/backend/regex/regc_nfa.c        |  314 +++++++++++++++++++++++++++--------
src/backend/regex/regcomp.c         |   12 +-
src/test/regress/expected/regex.out |   20 +++
src/test/regress/sql/regex.sql      |    7 +
4 files changed, 280 insertions(+), 73 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix tli history file fetching, broken by the archive after crash
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix infinite-loop risk in fixempties() stage of regex compilatio