-
-
Notifications
You must be signed in to change notification settings - Fork 237
Create sanitized response file instead of expanding arguments #480
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
Conversation
The cc_wrapper.sh scripts inspects response files and sanitizes each line within them. How the logic is structured currently causes all of these arguments to the be directly used later in the script. This can run into argument overflows. It can also run into problems where quoting in response files and from args is treated differently. This addresses some of the comments in bazel-contrib#430, namely cleaning up files and not overwriting the input files. I have not tried to apply a threshold here as that is best left up to the tooling that previously decided to use response files, which can cause difficult to debug changes in behavior. This conflicts with bazel-contrib#479, but is trying to address the same underlying problem of quoted arguments in response files as the result of golang's link actions. Fixes bazel-contrib#421
added a commit to address formatting errors and the unused variable. For me that isn't showing up on the PR due to github "Processing Updates" |
Head branch was pushed to by a user without write access
Force-pushed to get retry the "Processing updates". Should be good to go now. |
I think we still want both (this to avoid too long argument lines and the other one to correctly sanitize options within a response file). |
@dfreese Please fix the remaining linter findings, then this should be good to go in. |
Head branch was pushed to by a user without write access
Done. |
Thanks @dfreese! |
The cc_wrapper.sh scripts inspects response files and sanitizes each line within them. How the logic is structured currently causes all of these arguments to the be directly used later in the script. This can run into argument overflows. It can also run into problems where quoting in response files and from args is treated differently.
This addresses some of the comments in #430, namely cleaning up files and not overwriting the input files. I have not tried to apply a threshold here as that is best left up to the tooling that previously decided to use response files, which can cause difficult to debug changes in behavior.
This conflicts with #479, but is trying to address the same underlying problem of quoted arguments in response files as the result of golang's link actions.
Fixes #421