pgsql: Check for interrupts and stack overflow in TParserGet().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Check for interrupts and stack overflow in TParserGet().
Дата
Msg-id E1qDAeH-000FLV-4k@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Check for interrupts and stack overflow in TParserGet().

TParserGet() recurses for some token types, meaning it's possible
to drive it to stack overflow.  Since this is a minority behavior,
I chose to add the check_stack_depth() call to the two places that
recurse rather than doing it during every single call.

While at it, add CHECK_FOR_INTERRUPTS(), because this can run
unpleasantly long for long inputs.

Per bug #17995 from Zuming Jiang.  This is old, so back-patch
to all supported branches.

Discussion: https://postgr.es/m/17995-9f20ff3e6389db4c@postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a77d901714416f6bd4343c367585b060f385bbbc

Modified Files
--------------
src/backend/tsearch/wparser_def.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Define OPENSSL_API_COMPAT
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Check for interrupts and stack overflow in TParserGet().