Tweak allocation rule for tzload()'s "union local_storage" variable.
By default, allocate this via malloc, as we've been doing since commit 62c8421e8. Commit aeb07c55f adopted upstream tzdb's default of allocating it on the stack, but that still doesn't seem like a good idea for the reasons given in 62c8421e8 (and now memorialized in a comment, in hopes that we don't make the same mistake again). However, under USE_VALGRIND, put it on the stack as upstream does. This accidentally prevents a crash when Python 3.14 is used under Valgrind. The reasons for that are obscure, and it's most likely not our bug, and even if we figured it out it'd be nice to have a fix for buildfarm member skink now rather than after persuading the guilty party to fix it. In the normal non-USE_VALGRIND case, this has no effect on the logic in released branches, and it reverts master to match them. Reported-by: Alexander Lakhin <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bdd37402b6c881e790398537e847267097bc6b15 Modified Files -------------- src/timezone/localtime.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-)
