Skip to content

MSAN Warning on use-of-initialized-value in docopt::docopt_parse #149

Description

@acgetchell

Running my project through MSAN, which uses Docopt.cpp, gives me the following:

WARNING: MemorySanitizer: use-of-uninitialized-value
[1441]()6:     #0 0x434fdc in bcmp (/home/travis/build/acgetchell/CDT-plusplus/build/src/initialize+0x434fdc)
[1442]()6:     #1 0x625c4a in docopt::docopt_parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,

I think the error might be in this line:

docopt::docopt_parse(std::string const& doc,
		     std::vector<std::string> const& argv,
		     bool help,
		     bool version,
		     bool options_first)
{
	Required pattern;
	std::vector<Option> options; // <-- here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions