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_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/24dc4afebd5a82f30aed6bd18d48ff42ef787410 Modified Files -------------- src/backend/utils/mmgr/dsa.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)