diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-14 10:37:39 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-14 10:37:39 +0200 |
commit | c2146ce774e962830dd982b2060787f5a71713c2 (patch) | |
tree | 0a82b794243d9ba24d5e3a76ef20dc66495fa110 | |
parent | 59359fb44a6ddbed5d8d5487ec62da43db763299 (diff) | |
download | mariadb-git-c2146ce774e962830dd982b2060787f5a71713c2.tar.gz |
MDEV-24841: More workarounds
For some reason, the tests of the MemorySanitizer build on 10.5 failed
with both clang 13 and clang 14 with SIGSEGV. On 10.6 where it worked
better, some more places to work around were identified.
-rw-r--r-- | mysys/my_lib.c | 7 | ||||
-rw-r--r-- | storage/myisam/mi_info.c | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c index fedd1c7ab4d..fb03f0aa5c2 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -332,6 +332,13 @@ int my_fstat(File Filedes, MY_STAT *stat_area, DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags)); #ifdef _WIN32 DBUG_RETURN(my_win_fstat(Filedes, stat_area)); +#elif defined HAVE_valgrind + { + int s= fstat(Filedes, stat_area); + if (!s) + MSAN_STAT_WORKAROUND(stat_area); + DBUG_RETURN(s); + } #else DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area)); #endif diff --git a/storage/myisam/mi_info.c b/storage/myisam/mi_info.c index 50cb5439472..eec5c857786 100644 --- a/storage/myisam/mi_info.c +++ b/storage/myisam/mi_info.c @@ -87,7 +87,10 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag) x->index_file_name = share->index_file_name; } if ((flag & HA_STATUS_TIME) && !mysql_file_fstat(info->dfile, &state, MYF(0))) + { + MSAN_STAT_WORKAROUND(&state); x->update_time=state.st_mtime; + } else x->update_time=0; if (flag & HA_STATUS_AUTO) |