1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +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:
Marko Mäkelä
2024-03-18 16:01:29 +02:00
parent fb774eb1eb
commit 09d991d01c
8 changed files with 25 additions and 19 deletions

View File

@ -1008,7 +1008,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str, char *action_end)
st_debug_sync_action *action= NULL;
const char *errmsg;
char *ptr;
char *token;
char *token= nullptr;
uint token_length= 0;
DBUG_ENTER("debug_sync_eval_action");
DBUG_ASSERT(thd);