SaschaWillems / Vulkan-glTF-PBR

Physical based rendering with Vulkan using glTF 2.0 models
MIT License
915 stars 124 forks source link

Fix undefined behavior when adding validation layers #34

Closed syoyo closed 4 years ago

syoyo commented 4 years ago

const char * pointer is no longer valid after exiting the inner most if clause, resulting segmentation fault when compiled with release mode. The issue could be reproducible by building Vulkan-glTF-PBR with ASAN and use Vulkan-Loaders.

https://github.com/KhronosGroup/Vulkan-Loader/issues/316

This PR also fix compilation for gcc 7.4(memcpy undefined. No new line at the end of file)

SaschaWillems commented 4 years ago

Thanks for your PR. Very much appreciated.

syoyo commented 4 years ago

Awesome! :pray: