-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use applicaiton's alloc in layer #27
Comments
That does sound like a loader issue. There is a number of reason this kind of issue could happen in the layer (we could fail the allocation of a fence/semaphore implementing a timeline semaphore), so if the loader can't deal with that it sounds we're having an issue to implement creating internal objects to the layer. |
Yes. I searched on Vulkan-ValidationLayers and https://github.com/baldurk/sample_layer.git , didn't find any layer is using the application's allocation. |
I'm not sure if it is by design? |
I'll investigate and maybe raise an issue with the loader. The issue seems to be broader than just the allocation functions. Let's say in I think we would be in the same situation. Maybe we're missing a handshake somewhere with the loader... |
Ok, please try with CTS 1.2 (./deqp-vk -n dEQP-VK.api.object_management.alloc_callback_fail.device), a double free issue is raised. |
Hi @djdeath , do you have time to look into this issue? Once this is resolved, timeline_sempahore layer is supposed to pass CTS 1.2 now. |
Sorry for the late answer, I just filed KhronosGroup/Vulkan-Loader#339 |
closing since this appears to have been fixed by the loader. |
There are several CTS test cases to fail the alloc intensionally. Using application's alloc in layer will cause some problems besides checking allocation result in layers, take timeline_CreateDevice as example,
fpCreateDevice returns success, that means the icd device is added to logic device list of loader, following is the callstack,
However, if device_new is failed, fpDestroyDevice can't remove the icd device from loader's logic device list because loader's destroy device function can't be gotten by fpGetInstanceProcAddr(NULL, "vkDestroyDevice"),that is to say, there is no way to get the loader's destroy device function pointer. As a result, invalid icd device is stored in loader and double free issue happens later.
This issue can easily be reproduced with dEQP-VK.api.object_management.alloc_callback_fail.device
The text was updated successfully, but these errors were encountered: