On Mon, 22 Dec 2025 07:15:29 +0100 Henryk Paluch <[email protected]> wrote:
> 1. why there is used both __destructor__ and atexit(3) in Mesa's context.c These are different mechanisms to execute cleanup functions. You can have both executing the same function, as long as it checks the state and performs nop (no operations) if the cleanup had already been done. > 2. why my gdb does not catch __destructor__ call - is it called or not? I guess because SIGSEGV is delivered to the process before that function had a chance to execute? They don't run in parallel at the same time, so when atexit handler runs first, it crashes the process.
