[all-commits] [llvm/llvm-project] dab898: [Windows] Fix limit on command line size

Serge Pavlov via All-commits all-commits at lists.llvm.org
Wed Jul 22 22:27:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dab898f9ab62275f55eb2a7e76ea0cd01696f68e
      https://github.com/llvm/llvm-project/commit/dab898f9ab62275f55eb2a7e76ea0cd01696f68e
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2020-07-23 (Thu, 23 Jul 2020)

  Changed paths:
    M lldb/source/Host/windows/ProcessLauncherWindows.cpp
    M llvm/include/llvm/Support/Program.h
    M llvm/lib/Support/Windows/Program.inc
    M llvm/unittests/Support/CommandLineTest.cpp

  Log Message:
  -----------
  [Windows] Fix limit on command line size

This reapplies commit d4020ef7c474, reverted in ac0edc55887b because it
broke build of LLDB. This commit contains appropriate changes for LLDB.
The original commit message is below.

Documentation on CreateProcessW states that maximal size of command line
is 32767 characters including ternimation null character. In the
function llvm::sys::commandLineFitsWithinSystemLimits this limit was set
to 32768. As a result if command line was exactly 32768 characters long,
a response file was not created and CreateProcessW was called with
too long command line.

Differential Revision: https://reviews.llvm.org/D83772




More information about the All-commits mailing list