Using _mkdir of CRT in Asan Init leads to launch failure and hanging in Windows.
You can trigger it by calling:
set ASAN_OPTIONS=log_path=a/a/a
.\asan_program.exe
And their crash dump shows the following stack trace:
_guard_dispatch_icall_nop() __acrt_get_utf8_acp_compatibility_codepage() _mkdir(const char * path)
I guess there could be a cfg guard in CRT, which may lead to calling uninitialized cfg guard function address. Also, _mkdir supports UTF-8 encoding of the path and calls _wmkdir, but that's not necessary for this case since other file apis in sanitizer_win.cpp assumes only ANSI code case, so it makes sense to use CreateDirectoryA matching other file api calls in the same file.