Bug in NVIDIA driver 615.71.09?

Started by paperzlel, Sep 21, 2026, 06:18 AM

Previous topic - Next topic

paperzlel

Hey all,
I just started working on my graphics layer today and have ran into a really weird bug that I think is a problem with the Vulkan driver?
To explain, I'm running CachyOS with the 7.2 kernel, and the latest NVIDIA driver (proprietary). I was working on getting aligned memory allocations working (a lot up-front but it's worth it!) and I juuust managed to get all of that patched so it would function. Except, for some reason I'm getting a segfault in a `realloc()` call that I'm not making, and it's coming from several layers of indirection inside `libvulkan` which I can't debug properly. This issue seems to be particular to my own implementation, as every other application using Vulkan is fine, but can anyone else test my code and let me know if I'm going insane? I'm probably going to rewrite the allocator anyways because it's still super messy.
Thanks!

paperzlel

Ah, it's a implementation detail. I was storing the VkAllocationCallbacks structure as a static object in the source file, which NVidia doesn't like apparently and that was causing the driver to crash. Very weird bug and I suppose it's something I missed with regards to how the spec is worded!

travisvroman

Interesting! I wouldn't have guessed that was the issue. Technically it shouldn't matter where you keep it, so long as you aren't hot-reloading the code (that would break static storage).

My first guess would have been memory alignment, but it's always so hard to tell without knowing exactly where the segfault came from.

This is a good one for the books though - thanks for submitting it here!
Owner, Game Engine developer making Kohi Game Engine. Converts caffeine to code. Leader of the Dingus Army and originator of Dingus-Oriented Programming.

https://youtube.com/travisvroman
https://twitch.tv/travisvroman