head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.11.30.09.08.28; author wiz; state Exp; branches; next ; commitid uerpYkcG24mjRs5H; desc @@ 1.1 log @mesa: carry over atexit() patches from MesaLib, simplified Fixes coredumps on exit. Reported upstream, let's see what happens. XXX: there are a couple more atexit() locations remaining that might need patching as well. Bump PKGREVISION. @ text @$NetBSD$ avoid atexit in shared libraries. https://gitlab.freedesktop.org/mesa/mesa/-/work_items/17072 --- src/mesa/main/formats.c.orig 2026-11-30 08:50:39.761563717 +0000 +++ src/mesa/main/formats.c @@@@ -451,7 +451,7 @@@@ static once_flag format_array_format_table_exists = ON static struct hash_table *format_array_format_table; static once_flag format_array_format_table_exists = ONCE_FLAG_INIT; -static void +static void __attribute__((__destructor__)) format_array_format_table_destroy(void) { _mesa_hash_table_destroy(format_array_format_table, NULL); @@@@ -495,8 +495,6 @@@@ format_array_format_table_init(void) (void *)(intptr_t)array_format, (void *)(intptr_t)f); } - - atexit(format_array_format_table_destroy); } mesa_format @