radixtree: Fix SIGSEGV at update of embeddable value to non-embeddable.
authorMasahiko Sawada <msawada@postgresql.org>
Thu, 25 Apr 2024 12:48:52 +0000 (21:48 +0900)
committerMasahiko Sawada <msawada@postgresql.org>
Thu, 25 Apr 2024 12:48:52 +0000 (21:48 +0900)
commitbb7f195ff78851e5fcee7230108a16d70be13579
tree2f1532038ca222a2fe54e982c99217c125c80cfe
parente03ec4641d2493db6fbfc60ff78d0f0b36d2ead1
radixtree: Fix SIGSEGV at update of embeddable value to non-embeddable.

Also, fix a memory leak when updating from non-embeddable to
embeddable. Both were unreachable without adding C code.

Reported-by: Noah Misch
Author: Noah Misch
Reviewed-by: Masahiko Sawada, John Naylor
Discussion: https://postgr.es/m/20240424210319.4c.nmisch%40google.com
src/include/lib/radixtree.h
src/test/modules/test_tidstore/expected/test_tidstore.out
src/test/modules/test_tidstore/sql/test_tidstore.sql
src/test/modules/test_tidstore/test_tidstore.c