Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segfault for wrongly specified test on commandline. #21

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

mbroz
Copy link
Contributor

@mbroz mbroz commented Feb 6, 2024

If explicitly specified test does not exist,
dieharder segfaults, for example
dieharder -d 42
dieharder -d 5000

If explicitly specified test does not exist,
dieharder segfaults, for example
  dieharder -d 42
  dieharder -d 5000
@eddelbuettel
Copy link
Owner

Thanks for paying attention to that too. I long gave up on manually fiddling with argv[] and like getopt (from libc) or the wonderful (portable across languages) docopt.

Copy link
Owner

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@eddelbuettel eddelbuettel merged commit c987a15 into eddelbuettel:master Feb 6, 2024
1 check passed
@mbroz
Copy link
Contributor Author

mbroz commented Feb 6, 2024

Thanks!
Docopt looks interesting, did not know about it!
But rewrite diehard CLI parsing is not so easy :-)

@eddelbuettel
Copy link
Owner

Yes -- retrofitting is harder. I meant more for newer projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants