[all-commits] [llvm/llvm-project] 9a4b3f: [lldb][windows] _wsopen_s does not accept bits oth...

Yuxuan Shui via All-commits all-commits at lists.llvm.org
Wed Aug 30 05:54:22 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a4b3fdb82327e808213070fd157be3c557b8b9d
  Author: Yuxuan Shui <yshuiv7 at gmail.com>
  Date:   2023-08-30 (Wed, 30 Aug 2023)

  Changed paths:
    M lldb/source/Host/windows/FileSystem.cpp

  Log Message:
  [lldb][windows] _wsopen_s does not accept bits other than `_S_IREAD | _S_IWRITE`

When sending file from a Linux host to a Windows remote, Linux host will try to copy the source file's permission bits, which will contain `_S_I?GRP` and `_S_I?OTH` bits. Those bits are rejected by `_wsopen_s`, causing it to return EINVAL.

This patch masks out the rejected bits.

GitHub issue: #64313

Reviewed By: jasonmolenda, DavidSpickett

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

More information about the All-commits mailing list