#Possible memory leak with VK_INSTANCE

18 messages · Page 1 of 1 (latest)

dull umbra
#

I was following the vkguide.dev code when I realized that compiling with -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer (g++). I figured this was some sort of issue with using vkbootstrap improperly, but even making a new project, and then having only the instance create stuff from vulkan-tutorial and making sure vkDestroyInstance is being called results in the sanitizers complaining of leaked bytes. Is this just an error in my code or some quirk of vulkan that the sanitizers aren't accurate on?

vital acorn
#

Let me guess, you are getting a TON of 'cannot locate source' messages

#

I would very much hazzard a 'these are issues with the sanitizer not being able to peer inside the driver and make logical sense of things

dull umbra
#

No, it's all direct/indirect leaks at the end of the program

vital acorn
#

Plus, the reason you get errors in the sanitizer is that the leak check happens after the various driver dll's have been unloaded, leading to the sanitizer memory leaks being unable to resolve the source

#

can you copy paste the logs here?

dull umbra
#

Yeah, sure, give me a second

vital acorn
#

yep #1 0x7f1721d78945 (<unknown module>) is what I meant by cannot locate source

#

I saw these in 2017 when I first did vulkan so these are either complete false positives or just driver issues in general

dull umbra
#

Ok, that makes sense. I figured it was something to do with the sanitizers being unable to understand something, I just wanted to check

#

Thank you

vital acorn
#

(I have always wanted to try to figure out what is causing them, but its just not a huge priority)

warm ether
#

What happens if you compile the driver with debug info?

#

If i crash in the driver i get a stacktrace into the driver, so I maybe the sanitizer can also reach it?

vital acorn
waxen nova
#

I've noticed on Linux that there's 'leaks' whenever a .so is opened. But if you close and reopen the same library it doesn't leak more.

#

So it's not really a leak.