-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
Memory corruption in callstack recording #684
Comments
Have you tried bisecting this issue? |
ab1ec3f is the first bad commit |
Thanks. @tiago-rodrigues can you take a look? |
will do |
Unfortunately I haven't been able to repro this locally with our own app or the tracy test one. @wolfpld: maybe the best would be best to make TRACY_USE_IMAGE_CACHE disabled by by default until we figure out what is the issue? @YaLTeR: I assume you don't get the issue if TRACY_USE_IMAGE_CACHE is disabled? |
Yeah, if I comment out that define, it seems to work fine. |
I've created this: #685 to add disable the option for now. |
It's just mutter (GNOME's Wayland compositor) instrumented with Tracy. I run it, connect with Tracy, move the cursor around and wait a little for the data to flow in, then stop, and check the sampled call stacks. Most will contain those glitched strings. Might be a little annoying to run, but:
|
@YaLTeR. I only have access to Ubuntu systems right now, so I'm not sure I can build mutter easily there. The repro from @wolfpld might be simpler, I'm guessing it's not a public project? @wolfpld: could this be due to the fact that on image cache refresh, the old strings get deleted and we've returned that address on DecodeCallstackPtr() already, before it gets send back? Does it need a CopyStringFast() into CallstackEntryData::imageName? It wasn't being done before as it just returned dlinfo.dli_fname directly so I didn't do it either. |
I disabled clearing the cache on refresh in 5decb91, so that the refresh code only adds new entries to the cache. It should fix the problem. |
That appears to fix the problem, yeah. |
Random strings end up in the callstack Image column:
Both when capturing with the UI and with the capture executable.
I tried UBSan, it shows this, not sure if related:
I'm building as a shared library with
tracy_on_demand
. The same issue occurs with/without libunwind, the new dynload option, manual lifetime, offline.The text was updated successfully, but these errors were encountered: