Skip to content
Commit a54b6b33 authored by Alvin Wong's avatar Alvin Wong
Browse files

[sanitizer][win] Fix `Atexit()` on MinGW asan_dynamic runtime

Some functions of asan depends on `Atexit()` handlers. On Windows, this
is implemented in ad3ec82b to queue the
handlers in a vector then register them with `atexit()` only after the
CRT is fully initialized. However, this is broken on MinGW with
asan_dynamic runtime due to different initialization order. This change
fixes the issue by making sure that `Atexit()` can call `atexit()`
directly past the pre-initialization phase.

This fixes two asan test cases on MinGW.

Differential Revision: https://reviews.llvm.org/D147413
parent 225d255a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment