Open darkdragon-001 opened 3 years ago
My memory sanitizer shows me usage of uninitialized value
Self-built dynamic library with LLVM 11 and linked against LLVM's libc++.
Link your application with the memory sanitizer and run it: https://clang.llvm.org/docs/MemorySanitizer.html
Uninitialized bytes in MemcmpInterceptorCommon at offset 0 inside [0x705000000021, 3) ==544017==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x757bbe in memcmp (APPLICATION_BINARY+0x757bbe) #1 0x7f44446f6436 in std::__1::pair<std::__1::__tree_iterator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)>, std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)>, void*>*, long>, bool> std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)> > >::__emplace_hint_unique_key_args<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)> const&>(std::__1::__tree_const_iterator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)>, std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)>, void*>*, long>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, zmq::own_t* (zmq::session_base_t::*)(zmq::io_thread_t*, bool)> const&) (/usr/local/lib/libzmq.so.5+0x83436) #2 0x7f44446f5ded in _GLOBAL__sub_I_session_base.cpp (/usr/local/lib/libzmq.so.5+0x82ded) #3 0x7f444485796d (/lib64/ld-linux-x86-64.so.2+0x1196d) #4 0x7f4444857a57 (/lib64/ld-linux-x86-64.so.2+0x11a57) #5 0x7f4444847109 (/lib64/ld-linux-x86-64.so.2+0x1109) SUMMARY: MemorySanitizer: use-of-uninitialized-value (/tmp/go-build2113932925/b224/pipes.test+0x757bbe) in memcmp
Memory sanitizer doesn't find errors.
There's no symbols in that backtrace. Can you send a PR to fix it?
Issue description
My memory sanitizer shows me usage of uninitialized value
Environment
Self-built dynamic library with LLVM 11 and linked against LLVM's libc++.
Minimal test code / Steps to reproduce the issue
Link your application with the memory sanitizer and run it: https://clang.llvm.org/docs/MemorySanitizer.html
What's the actual result? (include assertion message & call stack if applicable)
What's the expected result?
Memory sanitizer doesn't find errors.