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

If an argument option returns an error we no longer try to load defa… #612

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

carbonneau1
Copy link
Collaborator

When passing a wrong expression/conjunction to the -o option a segmentation violation occured.
We were trying to free the conjunction twice.

Also once the error message was issued by the parser we did not check it before trying to set the default options causing an assert.

We now give the error messages an print the usage.

@carbonneau1 carbonneau1 requested a review from ofaaland November 26, 2024 19:54
Copy link
Collaborator

@ofaaland ofaaland left a comment

Choose a reason for hiding this comment

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

Hi @carbonneau1 thanks for tracking this down and fixing it. I have two code suggestions below. Also, please change your commit message to conform to the same standard we use for ZFS and Lustre,

Very Short (72 chars or less) summary (including utility if only one changed)

A blank line after the summary before the longer description (critical)

More detailed explanatory text. Wrap it to 72 characters. Give the
motivation for the change (ie "fixes a seg fault triggered by a double-free
when dsync is run with options dsync -o fubar") and a summary
of the code change(s).

A longer description of some good things things to think about with
commit messages is at https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53

@carbonneau1 carbonneau1 self-assigned this Dec 2, 2024
@carbonneau1 carbonneau1 changed the title If an argument option returnss an error we no longer try to load defa… If an argument option returns an error we no longer try to load defa… Dec 2, 2024
Copy link
Collaborator

@ofaaland ofaaland left a comment

Choose a reason for hiding this comment

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

Looks great!

For the commit message(s), can you add "dsync: " to the beginning of the summary (first line) since these changes don't affect any other utility?

It just makes it easier, later, if someone is looking for a change that fixed or created a bug they care about.

Then I'll approve and merge.

Copy link
Collaborator

@ofaaland ofaaland 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, thanks!

@ofaaland ofaaland merged commit d666b1f into main Dec 3, 2024
@carbonneau1 carbonneau1 deleted the eric_mfu_dev branch December 3, 2024 18:40
@carbonneau1
Copy link
Collaborator Author

carbonneau1 commented Dec 4, 2024

yes #608 fixed by #612 !

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