When MSVC’s Address Sanitizer (ASan) is enabled, I get consistent crashes when trying to create a VkInstance.
I’ve attached a sample project that recreates the issue. The program simply attempts to create a vulkan instance and destroy it. However, during the call to vkCreateInstance, a heap corruption error is reported.
Based on the suggestion from other ASan-related posts, I tried to ensure the ASan runtime library was loaded before the Vulkan driver, but found no equivalent for
LD_PRELOAD for MSVC. The output log does report the ASan runtime library being loaded before the Vulkan loader and driver.
I have also tried statically linking the runtime library (/MT and /MTd compile options), but the problem persists.
I have tested the smaple project with the following:
Microsoft Visual Studio 17.2.5 (MSVC version 14.32.31326)
Vulkan SDK version 1.3.216
NVidia driver version 516.40.
ASan_Vulkan.zip (3.1 KB)