| Bug #17405 | Valgrind: conditional jump or move depends on unititialised values | ||
|---|---|---|---|
| Submitted: | 15 Feb 2006 1:45 | Modified: | 11 Apr 2006 5:30 |
| Reporter: | Stewart Smith | ||
| Status: | Closed | ||
| Category: | Server: InnoDB | Severity: | S2 (Serious) |
| Version: | 4.0, 4.1, 5.0.19 bk | OS: | Any (all) |
| Assigned to: | Marko Mäkelä | Target Version: | |
[15 Feb 2006 1:45]
Stewart Smith
[15 Feb 2006 9:37]
Heikki Tuuri
Assigning this to Marko.
Fix: in buf_block_init(), set:
block->buf_fix_count = 0;
block->io_fix = 0;
block->magic_n = 0;
Enough to fix this in 5.0 and 5.1.
Regards,
Heikki
/*************************************************************************
Returns the number of latched pages in the buffer pool. */
ulint
buf_get_latched_pages_number(void)
{
buf_block_t* block;
ulint i;
ulint fixed_pages_number = 0;
mutex_enter(&(buf_pool->mutex));
for (i = 0; i < buf_pool->curr_size; i++) {
block = buf_pool_get_nth_block(buf_pool, i);
if (((block->buf_fix_count != 0) || (block->io_fix != 0)) &&
block->magic_n == BUF_BLOCK_MAGIC_N )
fixed_pages_number++;
}
mutex_exit(&(buf_pool->mutex));
return fixed_pages_number;
}
[15 Feb 2006 11:09]
Marko Mäkelä
I plugged this particular one with Heikki's directions. There still are similar cases, which I'm working on: ==24960== Conditional jump or move depends on uninitialised value(s) ==24960== at 0x83350E3: trx_sys_create_doublewrite_buf (trx0sys.c:198) ==24960== by 0x82F2547: innobase_start_or_create_for_mysql (srv0start.c:1574) ==24960== by 0x82E4E0B: innobase_init() (ha_innodb.cc:1433) ==24960== by 0x8259F11: ha_initialize_handlerton(handlerton*) (handler.cc:414) ==24960== by 0x8259F99: init_handlerton(THD*, st_plugin_int*, void*) (handler.cc:433) ==24960== by 0x82E224E: plugin_foreach(THD*, char (*)(THD*, st_plugin_int*, void*), int, void*) (sql_plugin.cc:891) ==24960== by 0x825A1D3: ha_init() (handler.cc:450) ==24960== by 0x8187336: init_server_components() (mysqld.cc:3284) ==24960== by 0x818BA97: main (mysqld.cc:3623)
[16 Feb 2006 8:33]
Marko Mäkelä
The patch suggested by Heikki has been committed to the InnoDB 5.0 and 5.1 source code repositories. Heikki says that eliminating uninitialized data in the first system tablespace pages (such as FIL_PAGE_TYPE, FIL_PAGE_PREV, FIL_PAGE_NEXT) has low priority. Thus, the warning about trx_sys_create_doublewrite_buf (trx0sys.c:198) testing uninitialized data and warnings about InnoDB writing uninitialized data will remain for the time being.
[5 Apr 2006 21:15]
Elliot Murphy
Fixed in InnoDB snapshot368; fixes are in 5.0.20.
[9 Apr 2006 6:49]
Paul DuBois
No changelog entry needed.
