[llvm-bugs] [Bug 27396] New: Response files with extra newlines (or '\r') aren't tokenized correctly

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Apr 17 23:40:53 PDT 2016


            Bug ID: 27396
           Summary: Response files with extra newlines (or '\r') aren't
                    tokenized correctly
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: srhines at google.com
                CC: danalbert at google.com, llvm-bugs at lists.llvm.org,
                    rnk at google.com
    Classification: Unclassified

As a result of the fix for Bug 17239
llvm::cl::TokenizeGNUCommandLine() ends up inserting additional nullptr fields
into the new argv. This can cause problems for joined command line arguments
(like passing "-x c" on separate lines.

This now causes issues with the gradle build system because they default to
passing response files full of arguments. On Windows systems, these response
files contain "\r\n", which ends up inserting the additional nullptr into argv.

I think the issue with the original patch (from r216280), is that it is
inserting the extra nullptr fields in the middle of the loop constructing the
new argv. It should instead just insert a nullptr at the end of the response
file (which will allow it to work correctly for the only use-case of /link in
clang-cl.exe). I have a patch that I can upload after a bit more testing (and
adding an explicit new test for verifying this works appropriately for cases
with extra newlines and/or windows line endings).

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160418/f6e468db/attachment.html>

More information about the llvm-bugs mailing list