aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-05-14 12:18:43 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-05-14 12:18:43 +0200
commit2115606b72912f2e1e3cf0bfb5e124eae8a39606 (patch)
tree50ef7178e515b345343a9e355c8e5fdfd8c02cec
parent4c3162b332e2dbccb089a667a358d03c85a40826 (diff)
downloadchattymalloc-2115606b72912f2e1e3cf0bfb5e124eae8a39606.tar.gz
chattymalloc-2115606b72912f2e1e3cf0bfb5e124eae8a39606.zip
chattyparser.py: save size of freed pointer in the free trace entry
-rwxr-xr-xchattyparser.py2
1 files changed, 2 insertions, 0 deletions
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