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

libsubprocess: avoid segfault on empty argv #4350

Merged

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Jun 1, 2022

Problem: flux_local_exec() did not check if the user supplied
any arguments for execution. This was not consistent to the
checks supplied by flux_rexec() and can lead to a segfault
internally.

Solution: Add a argument count check identical to the check done
in flux_rexec(). Add a unit test.

Fixes #4347

Problem: flux_local_exec() did not check if the user supplied
any arguments for execution.  This was not consistent to the
checks supplied by flux_rexec() and can lead to a segfault
internally.

Solution: Add a argument count check identical to the check done
in flux_rexec().  Add a unit test.

Fixes flux-framework#4347
Copy link
Contributor

@grondo grondo left a comment

Choose a reason for hiding this comment

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

LGTM!

I slightly prefer the title @garlick had for his version of the PR since it would be more clear in release notes what this fixes, i.e.

libsubprocess: avoid segfault on empty argv

@chu11 chu11 changed the title libsubprocess: check for args in local exec libsubprocess: avoid segfault on empty argv Jun 1, 2022
@chu11
Copy link
Member Author

chu11 commented Jun 1, 2022

title tweaked!, setting MWP

@mergify mergify bot merged commit 60c95ea into flux-framework:master Jun 1, 2022
@chu11 chu11 deleted the issue4347_libsubprocess_segfault branch June 1, 2022 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flux-shell segfaults during t2260-job-list.t
2 participants