Fix integer underflow in shared memory debugging dsa_dump would print a large negative number instead of zero for segment bin 0. Fix by explicitly checking for underflow and add special case for bin 0. Backpatch to all supported versions.
Author: Ian Ilyasov <ianilya...@outlook.com> Reviewed-by: Robert Haas <robertmh...@gmail.com> Discussion: https://postgr.es/m/gv1p251mb1004e0d09d117d3cecf9256ecd...@gv1p251mb1004.eurp251.prod.outlook.com Backpatch-through: v12 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/55ea12a2827791b7fb3f30b207a122a35df951d8 Modified Files -------------- src/backend/utils/mmgr/dsa.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)