Hi,
I tried to sanitize my code and all sanitizers pass fine, except for 'memory'. Then, I discovered it fails even on hello world project:
[lukasz@localhost tmp]$ cargo init hello
Created binary (application) package
[lukasz@localhost tmp]$ cd hello
[lukasz@localhost hello]$ RUSTFLAGS="-Z sanitizer=memory" cargo +nightly run --target x86_64-unknown-linux-gnu
Compiling hello v0.1.0 (/tmp/hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.79s
Runningtarget/x86_64-unknown-linux-gnu/debug/hello
Uninitialized bytes in __interceptor_memchr at offset 0 inside [0x701000000000, 4)
==27610==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x56500e54fd0e (/tmp/hello/target/x86_64-unknown-linux-gnu/debug/hello+0x68d0e)
#1 0x56500e5568ce (/tmp/hello/target/x86_64-unknown-linux-gnu/debug/hello+0x6f8ce)
#2 0x56500e4f1a5d (/tmp/hello/target/x86_64-unknown-linux-gnu/debug/hello+0xaa5d)
#3 0x56500e4f23c1 (/tmp/hello/target/x86_64-unknown-linux-gnu/debug/hello+0xb3c1)
#4 0x7f8aa2942fe9 (/lib64/libc.so.6+0x20fe9)
#5 0x56500e4f1879 (/tmp/hello/target/x86_64-unknown-linux-gnu/debug/hello+0xa879)SUMMARY: MemorySanitizer: use-of-uninitialized-value (/tmp/hello/target/x86_64-unknown-linux-gnu/debug/hello+0x68d0e) Exiting
Is this a bug in nightly?
Thanks,
Lukasz