diff options
author | Aditya A <aditya.a@oracle.com> | 2013-03-07 14:44:35 +0530 |
---|---|---|
committer | Aditya A <aditya.a@oracle.com> | 2013-03-07 14:44:35 +0530 |
commit | b6b3d6e2430b1e87da09310773c0ec5cd5e793d8 (patch) | |
tree | e1ff38296655cd297157da1df2dfd5ed358437d5 /storage/innobase/mem | |
parent | e478ceaa3f58ad4178144fa10ebbf35c50ba23c7 (diff) | |
download | mariadb-git-b6b3d6e2430b1e87da09310773c0ec5cd5e793d8.tar.gz |
BUG#16069598 - SERVER CRASH BY NULL POINTER DEREFERENCING IN
MEM_HEAP_CREATE_BLOCK()
PROBLEM
-------
If we give start mysqld with the option --innodb_log_buffer_size=50GB
,then mem_area_alloc() function fails to allocate memory and returns
NULL.In debug version we assert at this point,but there is no check in
release version and we get a segmentation fault.
FIX
---
Added a log message saying that we are unable to allocate memory.
After this message we assert.
[Approved by Kevin http://rb.no.oracle.com/rb/r/2065 ]
Diffstat (limited to 'storage/innobase/mem')
-rw-r--r-- | storage/innobase/mem/mem0mem.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/innobase/mem/mem0mem.c b/storage/innobase/mem/mem0mem.c index 7727760f1cd..797de06c896 100644 --- a/storage/innobase/mem/mem0mem.c +++ b/storage/innobase/mem/mem0mem.c @@ -353,7 +353,13 @@ mem_heap_create_block( block = (mem_block_t*) buf_block->frame; } - ut_ad(block); + if(!block) { + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Unable to allocate memory of size %lu.\n", + len); + ut_error; + } block->buf_block = buf_block; block->free_block = NULL; #else /* !UNIV_HOTBACKUP */ |