Fix major regression: Get backtrace in malloc properly.
authorMilian Wolff <mail@milianw.de>
Wed, 17 Dec 2014 13:09:19 +0000 (14:09 +0100)
committerMilian Wolff <mail@milianw.de>
Wed, 17 Dec 2014 13:09:19 +0000 (14:09 +0100)
Zomg, I must have been asleep when I comitted this - sorry.

libheaptrack.cpp

index eb707a8e299f6d7bae1392e05451bf7b4b79b317..19b44a761c6f8c13ee435d4781a74b9d011221fc 100644 (file)
@@ -534,6 +534,7 @@ void heaptrack_malloc(void* ptr, size_t size)
         debugLog<VeryVerboseOutput>("heaptrack_malloc(%p, %lu)", ptr, size);
 
         Trace trace;
+        trace.fill(2);
 
         HeapTrack heaptrack(guard);
         heaptrack.handleMalloc(ptr, size, trace);
@@ -560,9 +561,7 @@ void heaptrack_realloc(void* ptr_in, size_t size, void* ptr_out)
         debugLog<VeryVerboseOutput>("heaptrack_realloc(%p, %lu, %p)", ptr_in, size, ptr_out);
 
         Trace trace;
-        if (!trace.fill(2)) {
-            return;
-        }
+        trace.fill(2);
 
         HeapTrack heaptrack(guard);
         if (ptr_in) {