Bug #68025 | Server crash by null pointer dereferencing in mem_heap_create_block() | ||
---|---|---|---|
Submitted: | 4 Jan 2013 2:26 | Modified: | 14 Mar 2013 19:06 |
Reporter: | Tianyin Xu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 5.5.28 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[4 Jan 2013 2:26]
Tianyin Xu
[4 Jan 2013 2:42]
MySQL Verification Team
The value is capped on windows, so 32-bit binaries crash easier: [Warning] option 'innodb-log-buffer-size': signed value 214748364800 adjusted to 2147482624 mysqld.exe!mem_heap_create_block()[mem0mem.c:366] mysqld.exe!mem_heap_create_func()[mem0mem.ic:439] mysqld.exe!mem_alloc_func()[mem0mem.ic:532] mysqld.exe!log_init()[log0log.c:787] mysqld.exe!innobase_start_or_create_for_mysql()[srv0start.c:1430] mysqld.exe!innobase_init()[ha_innodb.cc:2590] mysqld.exe!ha_initialize_handlerton()[handler.cc:543] mysqld.exe!plugin_initialize()[sql_plugin.cc:1100] mysqld.exe!plugin_init()[sql_plugin.cc:1386] mysqld.exe!init_server_components()[mysqld.cc:3904] mysqld.exe!win_main()[mysqld.cc:4483] mysqld.exe!mysql_service()[mysqld.cc:4678] mysqld.exe!mysqld_main()[mysqld.cc:4872] mysqld.exe!__tmainCRTStartup()[crt0.c:266] On linux, we get Invalid write of size 8 at: mem_heap_create_block (mem0mem.cc:358) by: log_init() (mem0mem.ic:434) by: innobase_start_or_create_for_mysql() (srv0start.cc:1873) by: innobase_init(void*) (ha_innodb.cc:3269) by: ha_initialize_handlerton(st_plugin_int*) (handler.cc:658) by: plugin_initialize(st_plugin_int*) (sql_plugin.cc:1126) by: plugin_init(int*, char**, int) (sql_plugin.cc:1417) by: init_server_components() (mysqld.cc:4753) by: mysqld_main(int, char**) (mysqld.cc:5329) by: (below main) (libc-start.c:226) Address 0x70 is not stack'd, malloc'd or (recently) free'd
[14 Mar 2013 19:06]
Bugs System
Added changelog entry for 5.5.32, 5.6.12, 5.7.2. Starting "mysqld" with "--innodb_log_buffer_size=50GB" would fail to allocate memory and return NULL. For non-debug builds there was no check in place and a segmentation fault would occur. This fix adds a log message stating that memory failed to be allocated, and adds an assertion.