pgsql: Fix possible internal overflow in numeric division.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix possible internal overflow in numeric division.
Дата
Msg-id E1ZynA5-0003le-4k@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix possible internal overflow in numeric division.

div_var_fast() postpones propagating carries in the same way as mul_var(),
so it has the same corner-case overflow risk we fixed in 246693e5ae8a36f0,
namely that the size of the carries has to be accounted for when setting
the threshold for executing a carry propagation step.  We've not devised
a test case illustrating the brokenness, but the required fix seems clear
enough.  Like the previous fix, back-patch to all active branches.

Dean Rasheed

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/728a2ac214d8084cdc471fe18ece8d2699f47814

Modified Files
--------------
src/backend/utils/adt/numeric.c |   12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix possible internal overflow in numeric division.
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: pgsql: Generate parallel sequential scan plans in simple cases.