Previously, the platform Vulkan define was being set in BUILD.gn.
In a refactor it moved into a platform header.
This required that platform header to be included if using that platform's code.
This caused a problem where the function pointer header would change a struct's definition based on what platform it is being built for. For example, if we are building for Android then we need a function pointer to the Android Vulkan init.
If one translation unit has the platform header included, it would see a struct with that Android Vulkan init function pointer. If a second translation unit didn't include the platform header, it would see a different struct -- one without the Android Vulkan init.
As a result of the two translation units seeing different structs the final program would have undefined behavior. In this case, the UB manifest itself as clobbering data. The Android Vulkan init function pointer would be clobbered by whatever function pointer came after it in the list.
Comment 1 by bugdroid1@chromium.org
, Jun 12 2018