From: DJ Delorie Date: Thu, 30 Jun 2016 20:19:04 +0000 (-0400) Subject: Merge branch 'master' into dj/malloc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d7af358a376603f78ae503036e445699ada346c;p=thirdparty%2Fglibc.git Merge branch 'master' into dj/malloc --- 2d7af358a376603f78ae503036e445699ada346c diff --cc malloc/malloc.c index 57aca089fa9,1f5f166ea2e..891c644df21 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@@ -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