Commit 5f502ea3 authored by Aditya A's avatar Aditya A

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 ]
parent 6ff9305f
...@@ -353,7 +353,13 @@ mem_heap_create_block( ...@@ -353,7 +353,13 @@ mem_heap_create_block(
block = (mem_block_t*) buf_block->frame; 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->buf_block = buf_block;
block->free_block = NULL; block->free_block = NULL;
#else /* !UNIV_HOTBACKUP */ #else /* !UNIV_HOTBACKUP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment