vkDestroyInstance(NULL, NULL) segfaults with 367.57

Simple example code to segfault in the driver code:

VkInstance instance;
vkCreateInstance = vk_icdGetInstanceProcAddr(NULL, "vkCreateInstance");
vkCreateInstance(&info, NULL, &instance);
vkCreateInstance = vk_icdGetInstanceProcAddr(instance, "vkDestroyInstance");
vkDestroyInstance(NULL, NULL);

Of course NULL instance from application feels like application bug but specification follows free(3) style handling for NULL that vkDestroyInstance should check NULL instance before using the pointer.

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkDestroyInstance
“If instance is not NULL, instance must be a valid VkInstance handle”

The crash cannot happen when using linux loader between application and driver. But I’m checking my test code also directly against drivers which exposes some hidden issues.