-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MDEV-36316/MDEV-36327/MDEV-36328 Debug msan fixes 10.6 #3899
base: 10.6
Are you sure you want to change the base?
Changes from all commits
9ee600b
7aa79ec
f518ef4
5e9b106
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5453,7 +5453,7 @@ i_s_dict_fill_sys_columns( | |
const char* col_name, /*!< in: column name */ | ||
dict_col_t* column, /*!< in: dict_col_t struct holding | ||
more column information */ | ||
ulint nth_v_col, /*!< in: virtual column, its | ||
ulint* nth_v_col, /*!< in: virtual column, its | ||
sequence number (nth virtual col) */ | ||
Comment on lines
-5456
to
5457
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand why we would need any of the changes to this file and which problem these changes would solve. We’re no longer passing a read-only parameter by value but via a pointer that is effectively read-only. Can you test again without including any of these changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The error received was in MDEV-36327. It was working around a msan patten of possibly not tracing undefined memory once it got copied to registers and then used as argument to the next function. An alternative is:
|
||
TABLE* table_to_fill) /*!< in/out: fill this table */ | ||
{ | ||
|
@@ -5468,7 +5468,7 @@ i_s_dict_fill_sys_columns( | |
OK(field_store_string(fields[SYS_COLUMN_NAME], col_name)); | ||
|
||
if (column->is_virtual()) { | ||
ulint pos = dict_create_v_col_pos(nth_v_col, column->ind); | ||
ulint pos = dict_create_v_col_pos(*nth_v_col, column->ind); | ||
OK(fields[SYS_COLUMN_POSITION]->store(pos, true)); | ||
} else { | ||
OK(fields[SYS_COLUMN_POSITION]->store(column->ind, true)); | ||
|
@@ -5535,7 +5535,7 @@ i_s_sys_columns_fill_table( | |
if (!err_msg) { | ||
err = i_s_dict_fill_sys_columns( | ||
thd, table_id, col_name, | ||
&column_rec, nth_v_col, | ||
&column_rec, &nth_v_col, | ||
tables->table); | ||
if (err) { | ||
err = i_s_sys_error_handling(err, thd); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,9 @@ rec_set_bit_field_1( | |
ut_ad(((mask >> shift) << shift) == mask); | ||
ut_ad(((val << shift) & mask) == (val << shift)); | ||
|
||
#ifndef DBUG_OFF | ||
MEM_MAKE_DEFINED(rec - offs, 1); | ||
#endif | ||
mach_write_to_1(rec - offs, | ||
(mach_read_from_1(rec - offs) & ~mask) | ||
| (val << shift)); | ||
Comment on lines
+159
to
164
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks incorrect to me. Why would we claim that all bits at There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The trace was like in MDEV-36316. I agree it seem overly incorrect claiming all bits are initialised. It only occurred in Debug mode so I'm assuming a less optimised code makes this look different. I'll look at forcing a higher optimisation on these blocks as an alternative. |
||
|
@@ -198,6 +201,9 @@ rec_set_bit_field_2( | |
ut_ad(((mask >> shift) << shift) == mask); | ||
ut_ad(((val << shift) & mask) == (val << shift)); | ||
|
||
#ifndef DBUG_OFF | ||
MEM_MAKE_DEFINED(rec - offs, 2); | ||
#endif | ||
mach_write_to_2(rec - offs, | ||
(mach_read_from_2(rec - offs) & ~mask) | ||
| (val << shift)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would seem to be the actual fix.
~0ULL
might be a safer value, but I think that 0 should be OK as well, because the smallest possible index page number is 3.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I could add
MEM_UNDEFINED(&tuple1.page_id, sizeof tuple1.page_id)
(plus tuple2) to protect against futurebtr_estimate_n_rows_in_range
that access it.