mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-33478: Tests massively fail with clang-18 -fsanitize=memory
Starting with clang-16, MemorySanitizer appears to check that uninitialized values not be passed by value nor returned. Previously, it was allowed to copy uninitialized data in such cases. get_foreign_key_info(): Remove a local variable that was passed uninitialized to a function. DsMrr_impl: Initialize key_buffer, because DsMrr_impl::dsmrr_init() is reading it. test_bind_result_ext1(): MYSQL_TYPE_LONG is 32 bits, hence we must use a 32-bit type, such as int. sizeof(long) differs between LP64 and LLP64 targets.
This commit is contained in:
@@ -3842,7 +3842,7 @@ static void test_bind_result_ext1()
|
||||
short i_data;
|
||||
uchar b_data;
|
||||
int f_data;
|
||||
long bData;
|
||||
int bData;
|
||||
char d_data[20];
|
||||
double szData;
|
||||
MYSQL_BIND my_bind[8];
|
||||
@@ -3938,7 +3938,7 @@ static void test_bind_result_ext1()
|
||||
fprintf(stdout, "\n data (float) : %d(%lu)", f_data, length[4]);
|
||||
fprintf(stdout, "\n data (double) : %s(%lu)", d_data, length[5]);
|
||||
|
||||
fprintf(stdout, "\n data (bin) : %ld(%lu)", bData, length[6]);
|
||||
fprintf(stdout, "\n data (bin) : %d(%lu)", bData, length[6]);
|
||||
fprintf(stdout, "\n data (str) : %g(%lu)", szData, length[7]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user