Comment 3 for bug 534361

Revision history for this message
Kristian Nielsen (knielsen) wrote :

Thanks for the fix!

BTW, the second Valgrind stacktrace is caused by a simple off-by-one error in code only used to silence another false alarm from Valgrind:

=== modified file 'storage/pbxt/src/xactlog_xt.cc'
--- storage/pbxt/src/xactlog_xt.cc 2009-11-24 10:55:06 +0000
+++ storage/pbxt/src/xactlog_xt.cc 2010-03-16 09:43:50 +0000
@@ -1109,7 +1109,8 @@ xtBool XTDatabaseLog::xlog_append(XTThre
                        part_size = 512 - part_size;
                        xl_write_buffer[xl_write_buf_pos] = XT_LOG_ENT_END_OF_LOG;
 #ifdef HAVE_valgrind
- memset(xl_write_buffer + xl_write_buf_pos + 1, 0x66, part_size);
+ if (part_size > 1)
+ memset(xl_write_buffer + xl_write_buf_pos + 1, 0x66, part_size - 1);
 #endif
                        if (!xt_pwrite_file(xl_log_file, xl_write_log_offset, xl_write_buf_pos+part_size, xl_write_buffer, &thread->st_statistics.st_xlog, thread))
                                goto write_failed;