Skip to content

Static dtors are not run on DSO unload #159

@raziel-

Description

@raziel-

GCC11.3.0

Unloading a DSO that registers destructors/functions to be run on exit, will always crash when the main program exits

static dtors are not run on DSO unload, but at program exit. Since the SO is already unloaded, this causes a crash.

A simplified version of the repro code is at
https://github.com/PushmePullyu/sotest/tree/repro-dlclose-dtors
which removes the SDL dependency

See here for the full discussion:
https://bugs.scummvm.org/ticket/15015

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions