Open Arniiiii opened 2 hours ago
亲,来信已经收到!祝你快乐!
I guess minimal example is:
#include "argparse/argparse.hpp"
int main() {
argparse::ArgumentParser program("test");
}
if -stdlib=libc++
:
==214958==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x56476164f01f in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__is_long[abi:ne200000]() const /usr/include/c++/v1/string:1883:5
#1 0x5647616ae06e in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:ne200000](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&)::'lambda'(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&)::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) const /usr/include/c++/v1/string:1038:20
#2 0x564761663a5a in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string[abi:ne200000](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&) /usr/include/c++/v1/string:1037:16
#3 0x564761656837 in argparse::ArgumentParser::ArgumentParser(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, argparse::default_arguments, bool, std::__1::basic_ostream<char, std::__1::char_traits<char>>&) /home/paxu/.cache/cpm/argparse/507556e7ed2f3c27e6f551d1b276204dfbbe35ca/include/argparse/argparse.hpp:1610:9
#4 0x564761656440 in main /home/paxu/data/code/project/standalone/source/main.cpp:135:28
#5 0x7f66d882a44f in __libc_start_call_main /usr/src/debug/sys-libs/glibc-2.39-r6/glibc-2.39/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#6 0x7f66d882a508 in __libc_start_main@GLIBC_2.2.5 /usr/src/debug/sys-libs/glibc-2.39-r6/glibc-2.39/csu/../csu/libc-start.c:360:3
#7 0x5647615af544 in _start /usr/src/debug/sys-libs/glibc-2.39-r6/glibc-2.39/csu/../sysdeps/x86_64/start.S:115
SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/paxu/.cache/cpm/argparse/507556e7ed2f3c27e6f551d1b276204dfbbe35ca/include/argparse/argparse.hpp:1610:9 in argparse::ArgumentParser::ArgumentParser(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, argparse::default_arguments, bool, std::__1::basic_ostream<char, std::__1::char_traits<char>>&)
Exiting
Right after I start my program with relatively simple setup of arguments:
I am using latest commit of argparse : 84c02050ea8bd1bf99de0a4943db40235e9fd5e7