From 2115606b72912f2e1e3cf0bfb5e124eae8a39606 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 14 May 2020 12:18:43 +0200 Subject: chattyparser.py: save size of freed pointer in the free trace entry --- chattyparser.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'chattyparser.py') diff --git a/chattyparser.py b/chattyparser.py index 50cbcd2..6cc13a0 100755 --- a/chattyparser.py +++ b/chattyparser.py @@ -161,6 +161,8 @@ def record_allocation(trace, context): msg = f"WARNING: free of invalid pointer {freed_ptr:x}\n" else: size = allocations.pop(freed_ptr) * -1 + if trace.func == Function.free: + trace.var_arg = -1 * size msg = update_cache_lines(cache_lines, trace, size) # allocations -- cgit v1.2.3