Marking memory as "uninitalised" for drmemory ?

14 views
Skip to first unread message

Roland Mainz

unread,
Feb 22, 2025, 11:52:57 AMFeb 22
to Dr. Memory Users

Hi!

----

Is there any way (e.g. API, or "invalidate cache" CPU instructions) to tell drmemory that a chunk of memory is uninitialized again ?

For example we have code which uses custom functions to "allocate"&"free" same-sized blocks of memory from a |static| buffer. Unfortunately drmemory is only detecting uninitialized accesses on the first alloc/release cycle, after that it no longer knows that the chunk has been freed again.

----

Bye,
Roland

Derek Bruening

unread,
Feb 23, 2025, 10:36:23 PMFeb 23
to drmemor...@googlegroups.com
You can see the annotations currently supported here: https://github.com/DynamoRIO/drmemory/blob/master/drmemory/annotations.c#L104
I see marking unaddressable and marking defined: but not marking undefined.  You could add that and submit a PR.
A custom allocator interface is https://github.com/DynamoRIO/drmemory/issues/107 but unfortunately was never implemented; would most likely be done with more annotations.

--

---
You received this message because you are subscribed to the Google Groups "Dr. Memory Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drmemory-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/drmemory-users/7204a5b9-0171-4dec-b3cc-d40bf238106fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages