Bug 440765 - Feature request: when a dynamically allocated variable is last read/written
Summary: Feature request: when a dynamically allocated variable is last read/written
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-09 05:19 UTC by gao.jeff3
Modified: 2021-08-09 08:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gao.jeff3 2021-08-09 05:19:41 UTC
When performing a leak check in Valgrind, is it possible to include a feature detailing when a dynamically allocated variable is last read/written to?
Comment 1 Philippe Waroquiers 2021-08-09 08:13:16 UTC
Keeping a stack trace of all accesses is a very heavy functionality.
This can be implemented as e.g. helgrind --history=full provides 
this history of past accesses (with the amountof history to keep
controlled by --conflict-cache-size=N).

An alternative might be to use valgrind+gdb/vgdb and use the gdb command watch
to watch accesses to a piece of memory.