* 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.
This commit is contained in:
parent
9e86d4c59a
commit
3988c4a09f
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
|
@ -98,8 +98,11 @@ get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
|
|||
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,
|
||||
|
|
Loading…
Reference in a new issue