mariadb/storage/innobase/dict
Marko Mäkelä c36834c832 MDEV-20377: Make WITH_MSAN more usable
MemorySanitizer (clang -fsanitize=memory) requires that all code
be compiled with instrumentation enabled. The only exception is the
C runtime library. Failure to use instrumented libraries will cause
bogus messages about memory being uninitialized.

In WITH_MSAN builds, we must avoid calling getservbyname(),
because even though it is a standard library function, it is
not instrumented, not even in clang 10.

Note: Before MariaDB Server 10.5, ./mtr will typically fail
due to the old PCRE library, which was updated in MDEV-14024.

The following cmake options were tested on 10.5
in commit 94d0bb4dbe:

cmake \
-DCMAKE_C_FLAGS='-march=native -O2' \
-DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \
-DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \
-DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \
-DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \
-DWITH_SAFEMALLOC=OFF \
-DWITH_{ZLIB,SSL,PCRE}=bundled \
-DHAVE_LIBAIO_H=0 \
-DWITH_MSAN=ON

MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED()
and __msan_unpoison().

MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for
VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow().

InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros.

ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in
functions instead of inline assembler when building WITH_MSAN.
This will require at least -msse4.2 when building for IA-32 or AMD64.
The inline assembler would not be instrumented, and would thus cause
bogus failures.
2020-07-01 17:23:00 +03:00
..
dict0boot.cc MDEV-20949 Stop issuing 'row size' error on DML 2019-11-13 22:00:55 +07:00
dict0crea.cc MDEV-22721 Remove bloat caused by InnoDB logger class 2020-06-04 10:24:10 +03:00
dict0defrag_bg.cc Merge 10.1 into 10.2 2019-07-25 12:14:27 +03:00
dict0dict.cc MDEV-22456: Fix cmake -DWITH_INNODB_AHI=OFF 2020-05-19 16:02:13 +03:00
dict0load.cc innodb: dict_mem_table_add_col - compile warning fix argument 1 null where non-null expected (#1584) 2020-06-09 14:54:42 +03:00
dict0mem.cc MDEV-22456 Dropping the adaptive hash index may cause DDL to lock up InnoDB 2020-05-15 17:23:08 +03:00
dict0stats.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
dict0stats_bg.cc MDEV-7962: Follow-up fix for 10.2 2020-04-27 15:32:28 +03:00