pgsql: Fix use-after-free around DISTINCT transition function calls.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix use-after-free around DISTINCT transition function calls.
Дата
Msg-id E1bw43f-0004ME-AA@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix use-after-free around DISTINCT transition function calls.

Have tuplesort_gettupleslot() copy the contents of its current table slot
as needed. This is based on an approach taken by tuplestore_gettupleslot().
In the future, tuplesort_gettupleslot() may also be taught to avoid copying
the tuple where caller can determine that that is safe (the
tuplestore_gettupleslot() interface already offers this option to callers).

Patch by Peter Geoghegan. Fixes bug #14344, reported by Regina Obe.

Report: <20160929035538.20224.39628@wrigleys.postgresql.org>

Backpatch-through: 9.6

Branch
------
master

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

Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 9 +++++++++
1 file changed, 9 insertions(+)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Replace PostmasterRandom() with a stronger way of generating ran
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix use-after-free around DISTINCT transition function calls.