mariadb/storage
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
..
archive Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
blackhole MDEV-11094: Blackhole table updates on slave fail when row annotation is enabled 2019-05-29 17:35:29 +05:30
cassandra Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
connect cmake: quieter 2020-05-31 11:29:43 +02:00
csv Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
example Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
federated Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
federatedx Merge 10.1 into 10.2 2019-04-03 19:58:47 +03:00
heap MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOS 2019-11-19 16:28:15 +03:00
innobase MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
maria Fixed crash in aria recovery when using bulk insert 2020-05-26 20:05:17 +03:00
mroonga Merge 10.1 into 10.2 2020-06-01 09:33:03 +03:00
myisam Merge 10.1 into 10.2 2020-07-01 12:03:55 +03:00
myisammrg Fix GCC 10.0 -Wstringop-overflow 2020-03-13 12:09:19 +02:00
oqgraph Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
perfschema Fix GCC 10 -Wstringop-truncation 2020-03-13 07:39:14 +02:00
rocksdb Revert "MDEV-12445 : Rocksdb does not shutdown worker threads and aborts in memleak check on server shutdown" 2020-05-27 15:56:40 +02:00
sequence Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
sphinx MDEV-20647 Fix and enable SphinxSE tests 2019-09-30 15:47:09 +03:00
spider MDEV-17508 Fix bug for spider when using "not like" 2019-11-25 15:40:01 +01:00
test_sql_discovery Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
tokudb get rid of cmake warning 2020-05-27 15:56:40 +02:00
xtradb Merge 10.1 into 10.2 2020-05-20 11:13:40 +03:00