Kernel - Updated free's error checking to print the return addr
authorJohn Hodge <[email protected]>
Thu, 20 Oct 2011 13:12:31 +0000 (21:12 +0800)
committerJohn Hodge <[email protected]>
Thu, 20 Oct 2011 13:12:31 +0000 (21:12 +0800)
Kernel/heap.c

index 6915d34..e53f5b8 100644 (file)
@@ -310,8 +310,8 @@ void Heap_Deallocate(void *Ptr)
        // Sanity check
        if((Uint)Ptr < (Uint)gHeapStart || (Uint)Ptr > (Uint)gHeapEnd)
        {
-               Log_Warning("Heap", "free - Passed a non-heap address (%p < %p < %p)\n",
-                       gHeapStart, Ptr, gHeapEnd);
+               Log_Warning("Heap", "free - Passed a non-heap address by %p (%p < %p < %p)\n",
+                       __builtin_return_address(0), gHeapStart, Ptr, gHeapEnd);
                return;
        }
        

UCC git Repository :: git.ucc.asn.au