aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_gist.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2022-06-27 10:30:15 +1200
committerThomas Munro <tmunro@postgresql.org>2022-06-27 11:34:26 +1200
commit7201cd18627afc64850537806da7f22150d1a83b (patch)
tree6c6343f65ef9f3edb122321361a3c24bdfcabc67 /contrib/intarray/_int_gist.c
parentebc584ed495d7ad3a3f33db4e75d9543ff6a87d1 (diff)
downloadpostgresql-7201cd18627afc64850537806da7f22150d1a83b.tar.gz
postgresql-7201cd18627afc64850537806da7f22150d1a83b.zip
Fix relptr's encoding of the base address.
Previously, we encoded both NULL and the first byte at the base address as 0. That confusion led to the assertion in commit e07d4ddc, which failed when min_dynamic_shared_memory was used. Give them distinct encodings, by switching to 1-based offsets for non-NULL pointers. Also improve macro hygiene in passing (missing/misplaced parentheses), and remove open-coded access to the raw offset value from freepage.c/h. Although e07d4ddc was back-patched to 10, the only code that actually makes use of relptr at the base address arrived in 84b1c63a, so no need to back-patch further than 14 for now. Reported-by: Justin Pryzby <pryzby@telsasoft.com> Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/20220519193839.GT19626%40telsasoft.com
Diffstat (limited to 'contrib/intarray/_int_gist.c')
0 files changed, 0 insertions, 0 deletions