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/drm-shim/drm_shim.c.orig 2026-11-30 08:45:50.961616441 +0000 +++ src/drm-shim/drm_shim.c @@@@ -217,7 +217,7 @@@@ drm_shim_inited(void) return p_atomic_read(&inited); } -static void +static void __attribute__((__destructor__)) destroy_shim(void) { _mesa_set_destroy(opendir_set, NULL); @@@@ -271,8 +271,6 @@@@ init_shim(void) } drm_shim_device_init(); - - atexit(destroy_shim); p_atomic_set(&inited, 1); in_init = false; @