head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 2026.11.30.09.08.27; 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/context.c.orig 2026-11-30 08:49:46.982640866 +0000 +++ src/mesa/main/context.c @@@@ -181,7 +181,7 @@@@ GLfloat _mesa_ubyte_to_float_color_tab[256]; * Calls all the various one-time-fini functions in Mesa */ -static void +static void __attribute__((__destructor__)) one_time_fini(void) { glsl_type_singleton_decref(); @@@@ -218,8 +218,6 @@@@ one_time_init(const char *extensions_override) for (i = 0; i < 256; i++) { _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F; } - - atexit(one_time_fini); #if MESA_DEBUG if (MESA_VERBOSE != 0) { @