Skip to content

Windows TLS destructors don't run in a statically linked binary #28111

Closed
@nagisa

Description

@nagisa

On -msvc TLS destructors do not appear to be run at all.

On -gnu TLS destructors appear to run when a non-main thread exits (as expected) or std::process:exit is called (es expected), but not run when main thread is terminated normally (by returning from fn main; not expected).

Various variations of this/this program has been used for testing.

cc @retep998 who did the testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions