diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-14 09:28:55 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-03-14 09:28:55 +0200 |
commit | 59359fb44a6ddbed5d8d5487ec62da43db763299 (patch) | |
tree | a99f6d12e0350c89d2f629d8ee67ea0e14817c71 /sql/datadict.cc | |
parent | d78173828e9f69ab3f6a406cb38f323261171076 (diff) | |
download | mariadb-git-59359fb44a6ddbed5d8d5487ec62da43db763299.tar.gz |
MDEV-24841 Build error with MSAN use-of-uninitialized-value in comp_err
The MemorySanitizer implementation in clang includes some built-in
instrumentation (interceptors) for GNU libc. In GNU libc 2.33, the
interface to the stat() family of functions was changed. Until the
MemorySanitizer interceptors are adjusted, any MSAN code builds
will act as if that the stat() family of functions failed to initialize
the struct stat.
A fix was applied in
https://reviews.llvm.org/rG4e1a6c07052b466a2a1cd0c3ff150e4e89a6d87a
but it fails to cover the 64-bit variants of the calls.
For now, let us work around the MemorySanitizer bug by defining
and using the macro MSAN_STAT_WORKAROUND().
Diffstat (limited to 'sql/datadict.cc')
-rw-r--r-- | sql/datadict.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/datadict.cc b/sql/datadict.cc index e09eee98565..37f90d0309a 100644 --- a/sql/datadict.cc +++ b/sql/datadict.cc @@ -128,6 +128,8 @@ Table_type dd_frm_type(THD *thd, char *path, LEX_CSTRING *engine_name) if (mysql_file_fstat(file, &state, MYF(MY_WME))) goto err; + MSAN_STAT_WORKAROUND(&state); + if (mysql_file_seek(file, 0, SEEK_SET, MYF(MY_WME))) goto err; |