diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-10-29 16:39:03 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-29 16:39:03 -0400 |
commit | 6ef76f3b515c45a83f7831f806bf97a2af9ed008 (patch) | |
tree | 098c3c6dfe036e5e7c45e216ae8dbd1885d11fbb /malloc/malloc.c | |
parent | 9beb2334930db81ceada5aa6051fe5ac0554db32 (diff) | |
download | glibc-6ef76f3b515c45a83f7831f806bf97a2af9ed008.tar.gz glibc-6ef76f3b515c45a83f7831f806bf97a2af9ed008.tar.xz glibc-6ef76f3b515c45a83f7831f806bf97a2af9ed008.zip |
Avoid assertion in processes with VM in bad shape
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 864c7d908b..8608083adb 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -2855,10 +2855,10 @@ munmap_chunk(mchunkptr p) mp_.n_mmaps--; mp_.mmapped_mem -= total_size; - int ret __attribute__ ((unused)) = munmap((char *)block, total_size); - - /* munmap returns non-zero on failure */ - assert(ret == 0); + /* If munmap failed the process virtual memory address space is in a + bad shape. Just leave the block hanging around, the process will + terminate shortly anyway since not much can be done. */ + munmap((char *)block, total_size); } #if HAVE_MREMAP |