-
Notifications
You must be signed in to change notification settings - Fork 383
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] Quote command line segment using shlex #3578
Merged
bruntib
merged 1 commit into
Ericsson:master
from
steakhal:shlex-quote-command-segments
Jan 21, 2022
Merged
[fix] Quote command line segment using shlex #3578
bruntib
merged 1 commit into
Ericsson:master
from
steakhal:shlex-quote-command-segments
Jan 21, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csordasmarton
added
analyzer 📈
Related to the analyze commands (analysis driver)
bugfix 🔨
test ☑️
Adding or refactoring tests
labels
Jan 13, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some tiny comments, otherwise LGTM!
steakhal
force-pushed
the
shlex-quote-command-segments
branch
from
January 13, 2022 15:08
e1893f3
to
1a0782a
Compare
steakhal
force-pushed
the
shlex-quote-command-segments
branch
2 times, most recently
from
January 15, 2022 09:54
6f9bb89
to
134dd2b
Compare
Simply joining command segments is not enough for acquiring a valid command. One should escape the necessary characters prior to that. Escaping can be done manually, but using shlex is the preferred way of doing so. This patch might not fix all of the issues. There were multiple places where this was not done adequately: * at calling `intercept-build` * at parsing the `compile_commands.json`'s `arguments` field * at extending the command with the referred response file's content * at extending the command without response files * at the `libtest/codechecker.py/all_command()` helper function * at a bunch of other places where a command is being logged - but for brevity, I've just fixed the two most important places of this - `analyzer_base.py/analyze()` - `analysis_manager.py/handle_reproducer()`
steakhal
force-pushed
the
shlex-quote-command-segments
branch
from
January 15, 2022 12:23
134dd2b
to
7bd706c
Compare
csordasmarton
approved these changes
Jan 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Ping. |
bruntib
approved these changes
Jan 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
analyzer 📈
Related to the analyze commands (analysis driver)
bugfix 🔨
test ☑️
Adding or refactoring tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simply joining command segments is not enough for acquiring a valid
command. One should escape the necessary characters prior to that.
Escaping can be done manually, but using
shlex
is the preferred wayof doing so.
This patch might not fix all of the issues.
There were multiple places where this was not done adequately:
intercept-build
compile_commands.json
'sarguments
fieldlibtest/codechecker.py/all_command()
helper functionfor brevity, I've just fixed the two most important places of this
analyzer_base.py/analyze()
analysis_manager.py/handle_reproducer()