crash with one dash
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by compiling and running the supplied C++ reproducer with the single-dash option to confirm the crash. Then trace the command-line parsing entry point and compare the behavior with the documented option syntax; done means the crash is addressed and the single-dash case has a regression test.
Written by the indexing model from the issue text.
Description
please see attached GIF demonstrate crash with one dash i.e. to wit if an option is introduced w/ one dash instead of two exception is thrown . below is code executed .
#include <boost\program_options.hpp>
#include <map>
#include <string>
using namespace std;
const string option_flag = "O";
const string option_flag_description = string("an option");
const map<string , string> options__description_map = {
{option_flag, option_flag_description},
};
int main(int argc, const char* argv[], const char* envp[])
{
boost::program_options::variables_map vm;
string macros;
boost::program_options::options_description options_description("bugyCode options");
options_description.add_options()
(option_flag.c_str(), boost::program_options::value<string>(¯os), option_flag_description.c_str());
boost::program_options::store(boost::program_options::parse_command_line(argc, argv, options_description), vm);
boost::program_options::notify(vm);
return 0;
}

- Dominant language
- C++
- Stars
- 136
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/program_options
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
boostorg/program_options#147 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
boostorg/program_options#146 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
boostorg/program_options#144 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
boostorg/program_options#142 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
boostorg/program_options#139 ·
All issues in boostorg/program_options
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100