+2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/kern/mm.c (get_header_from_pointer): Put a more informative
+ message on double free. Put the value of magic in case of mismatch.
+
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
Speed-up video on yeeloong.
grub_fatal ("out of range pointer %p", ptr);
*p = (grub_mm_header_t) ptr - 1;
+ if ((*p)->magic == GRUB_MM_FREE_MAGIC)
+ grub_fatal ("double free at %p", *p);
if ((*p)->magic != GRUB_MM_ALLOC_MAGIC)
- grub_fatal ("alloc magic is broken at %p", *p);
+ grub_fatal ("alloc magic is broken at %p: %lx", *p,
+ (unsigned long) (*p)->magic);
}
/* Initialize a region starting from ADDR and whose size is SIZE,