A bug of Loader on ARM platform #732
A segment fault is observed on ARM platform when a Vulkan application using private Vulkan extensions. And this is a ARM specific bug which cannot be reproduced on X86_64 Windows or X86_64 Linux. This bug is related to the feature of Tail-Call which is used by Vulkan-Loader.
The behavior of Vulkan-Loader is that Vulkan-Loader must expose its own functions to application, since some objects are wrapped by Loader, and those object cannot be recognized by Driver or Layer until they are unwrapped, so the entry point of each Vulkan API must come from Vulkan-Loader, the call sequence could be: App -> Vulkan-Loader API -> Vulkan Layer1 API -->… --> Vulkan LayerN API --> Driver ICD API.
The call sequence is that:
To support this functionality, the feature of Tail-call is used by the Vulkan-Loader, it’s enabled by GCC when optimization level O2 or O3 is used. However, we found a ARM GCC’s bug which cause a segment fault.
The bug of ARM GCC.
The following is the corresponding assembly code of calling ICD::vkGetDoSomethingAMD from Loader which is generated by ARM GCC:
Is it a known issue, can someone provide a official fix from Loader side? Such as write a universal assembly code for the ARM GCC.
The text was updated successfully, but these errors were encountered:
I'd really love to know if the merged arm assembly code fixes this, since then we know what the cause & fix was.
As in, if fixes the problem close the issue but if the need for cross compile support isn't done we should create a separate issue to track it.