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;
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' pbxt/src/ xactlog_ xt.cc 2009-11-24 10:55:06 +0000 pbxt/src/ xactlog_ xt.cc 2010-03-16 09:43:50 +0000 :xlog_append( XTThre
part_ size = 512 - part_size;
xl_write_ buffer[ xl_write_ buf_pos] = XT_LOG_ ENT_END_ OF_LOG; xl_write_ buffer + xl_write_buf_pos + 1, 0x66, part_size); xl_write_ buffer + xl_write_buf_pos + 1, 0x66, part_size - 1);
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;
--- storage/
+++ storage/
@@ -1109,7 +1109,8 @@ xtBool XTDatabaseLog:
#ifdef HAVE_valgrind
- memset(
+ if (part_size > 1)
+ memset(
#endif