gn: Disable function UBsan check to support new vulkan.hpp function pointers #1664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
KhronosGroup/Vulkan-Hpp#2020 added
vk::PFN_...
function pointer types as the preferred function pointers used in vulkan.hpp structs and functions.These function pointer types use C++-styled types for the function arguments and return values, so the compiler treats them as types different from the C-styled "PFN_...` function pointers types. Vulkan-Hpp guarantees that they are binary identical during compile time, but UBsan's function sanitizer trigger a "function pointer type different" runtime error when these function pointers are invoked in the Vulkan-Loader (for example, debug_utils.c and allocation.c) -- see KhronosGroup/Vulkan-Hpp#2082 for example.
This change disables the function sanitizer from the Vulkan-Loader (where the function pointers are invoked) so that Vulkan applications created using Vulkan-Hpp can run correctly when UBsan is enabled.
Test: Vulkan example vkcontext with change https://fuchsia-review.googlesource.com/c/fuchsia/+/1208145 didn't crash on Fuchsia core.x64-asan build.
Bug: https://fxbug.dev/378964821