diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-03-31 18:06:13 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-03-31 18:06:13 +0300 |
commit | f4b6dab211a1bac4d636aed32de40022ababcd06 (patch) | |
tree | dbdd601c34d35d61b569198bbf59f55cd2f528eb /innobase/fil | |
parent | bdb370c872853e092aa8de749ca306ed7b2f411d (diff) | |
download | mariadb-git-f4b6dab211a1bac4d636aed32de40022ababcd06.tar.gz |
fil0fil.c:
Add assertions to check that we do not go out of bounds of io thread status array
os0file.c:
Fix memory corruption (assertion failure on line 244 of sync0sync.c) reported by Miguel in a Windows build of MySQL-4.1.2. The bug is present in all InnoDB versions in Windows, but it depends on how the linker places a static array in srv0srv.c, whether the bug shows itself. 4 bytes were overwritten with a pointer to a statically allocated string: 'get windows aio return value'.
innobase/os/os0file.c:
Fix memory corruption (assertion failure on line 244 of sync0sync.c) reported by Miguel in a Windows build of MySQL-4.1.2. The bug is present in all InnoDB versions in Windows, but it depends on how the linker places a static array in srv0srv.c, whether the bug shows itself. 4 bytes were overwritten with a pointer to a statically allocated string: 'get windows aio return value'.
innobase/fil/fil0fil.c:
Add assertions to check that we do not go out of bounds of io thread status array
Diffstat (limited to 'innobase/fil')
-rw-r--r-- | innobase/fil/fil0fil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index 9f33013d2f9..35a028822c0 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -1331,6 +1331,7 @@ fil_aio_wait( ut_ad(fil_validate()); if (os_aio_use_native_aio) { + ut_a(segment < SRV_MAX_N_IO_THREADS); srv_io_thread_op_info[segment] = (char *) "native aio handle"; #ifdef WIN_ASYNC_IO ret = os_aio_windows_handle(segment, 0, &fil_node, &message, @@ -1342,6 +1343,7 @@ fil_aio_wait( ut_error; #endif } else { + ut_a(segment < SRV_MAX_N_IO_THREADS); srv_io_thread_op_info[segment] =(char *)"simulated aio handle"; ret = os_aio_simulated_handle(segment, (void**) &fil_node, @@ -1350,6 +1352,7 @@ fil_aio_wait( ut_a(ret); + ut_a(segment < SRV_MAX_N_IO_THREADS); srv_io_thread_op_info[segment] = (char *) "complete io for fil node"; mutex_enter(&(system->mutex)); @@ -1363,10 +1366,12 @@ fil_aio_wait( /* Do the i/o handling */ if (buf_pool_is_block(message)) { + ut_a(segment < SRV_MAX_N_IO_THREADS); srv_io_thread_op_info[segment] = (char *) "complete io for buf page"; buf_page_io_complete(message); } else { + ut_a(segment < SRV_MAX_N_IO_THREADS); srv_io_thread_op_info[segment] =(char *) "complete io for log"; log_io_complete(message); } |