Description:
With 8.0.2, using -DWITH_MSAN=ON with clang 4.0.0 results in a build error:
[ 9%] Generating lex_hash.h
==19978==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x498d25 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x498d25)
#1 0x498194 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x498194)
#2 0x497d2d (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x497d2d)
#3 0x497400 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x497400)
#4 0x496cee (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x496cee)
#5 0x4977c8 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x4977c8)
#6 0x7f6a146be3f0 (/lib/x86_64-linux-gnu/libc.so.6+0x203f0)
#7 0x41c7e9 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x41c7e9)
Uninitialized value was created by a heap allocation
#0 0x492a60 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x492a60)
#1 0x49a0aa (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x49a0aa)
#2 0x499106 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x499106)
#3 0x4982c5 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x4982c5)
#4 0x497d2d (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x497d2d)
#5 0x497400 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x497400)
#6 0x496cee (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x496cee)
#7 0x4977c8 (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x4977c8)
#8 0x7f6a146be3f0 (/lib/x86_64-linux-gnu/libc.so.6+0x203f0)
SUMMARY: MemorySanitizer: use-of-uninitialized-value (/home/laurynas/obj-mysql-8.0.2-pp-msan-debug/sql/gen_lex_hash+0x498d25)
Exiting
How to repeat:
cmake ... -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DWITH_MSAN=ON