postgresql/src
Daniel Gustafsson a30a305584 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 <ianilyasov@outlook.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Discussion: https://postgr.es/m/GV1P251MB1004E0D09D117D3CECF9256ECD502@GV1P251MB1004.EURP251.PROD.OUTLOOK.COM
Backpatch-through: v12
2024-02-29 12:19:52 +01:00
..
backend Fix integer underflow in shared memory debugging 2024-02-29 12:19:52 +01:00
bin Skip .DS_Store files in server side utils 2024-02-13 13:47:12 +01:00
common Move is_valid_ascii() to ascii.h. 2024-01-29 12:09:03 -06:00
fe_utils Don't spuriously report FD_SETSIZE exhaustion on Windows. 2023-10-14 15:54:49 -07:00
include Fix gai_strerror() thread-safety on Windows. 2024-02-12 11:14:42 +13:00
interfaces ecpg: Fix zero-termination of string generated by intoasc() 2024-02-19 11:38:44 +09:00
makefiles Use --strip-unneeded when stripping static libraries with GNU strip. 2023-04-20 18:12:32 -04:00
pl Translation updates 2024-02-05 14:45:29 +01:00
port Fix gai_strerror() thread-safety on Windows. 2024-02-12 11:14:42 +13:00
template Use unnamed POSIX semaphores on Cygwin. 2023-01-06 10:33:28 +13:00
test Fix mis-rounding and overflow hazards in date_bin(). 2024-02-28 14:00:30 -05:00
timezone Update time zone data files to tzdata release 2024a. 2024-02-01 15:57:53 -05:00
tools Fix gai_strerror() thread-safety on Windows. 2024-02-12 11:14:42 +13:00
tutorial Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore
DEVELOPERS
Makefile Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
Makefile.global.in Suppress macOS warnings about duplicate libraries in link commands. 2023-09-29 14:07:30 -04:00
Makefile.shlib Stop using "-multiply_defined suppress" on macOS. 2023-09-26 21:06:21 -04:00
meson.build Integrate pg_bsd_indent into our build/test infrastructure. 2023-02-12 12:22:21 -05:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00