]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Merge branch 'master' into dj/malloc
authorDJ Delorie <dj@delorie.com>
Thu, 30 Jun 2016 20:19:04 +0000 (16:19 -0400)
committerDJ Delorie <dj@delorie.com>
Thu, 30 Jun 2016 20:19:04 +0000 (16:19 -0400)
1  2 
malloc/malloc.c

diff --cc malloc/malloc.c
index 57aca089fa9b70ab040fb207942152c7f62b6d54,1f5f166ea2ecdf601546b4157e3a291dd5c330a4..891c644df21cb5f6645011615e9d9030ef2739f6
@@@ -2927,11 -2837,13 +2942,16 @@@ munmap_chunk (mchunkptr p
  
    assert (chunk_is_mmapped (p));
  
+   /* Do nothing if the chunk is a faked mmapped chunk in the dumped
+      main arena.  We never free this memory.  */
+   if (DUMPED_MAIN_ARENA_CHUNK (p))
+     return;
    uintptr_t block = (uintptr_t) p - p->prev_size;
    size_t total_size = p->prev_size + size;
 +#if 0
 +  fprintf(stderr, "DJ: p  %p sz %5lx ps %lx s %lx\n", p, (int64_t)p->size, (int64_t)p->prev_size, (int64_t)size);
 +#endif
    /* Unfortunately we have to do the compilers job by hand here.  Normally
       we would test BLOCK and TOTAL-SIZE separately for compliance with the
       page size.  But gcc does not recognize the optimization possibility