[Lldb-commits] [PATCH] D156817: [lldb][windows] _wsopen_s does not accept bits other than `_S_IREAD | _S_IWRITE`
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 30 05:55:14 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9a4b3fdb8232: [lldb][windows] _wsopen_s does not accept bits other than `_S_IREAD | _S_IWRITE` (authored by yshui, committed by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D156817?vs=546133&id=554679#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156817/new/
https://reviews.llvm.org/D156817
Files:
lldb/source/Host/windows/FileSystem.cpp
Index: lldb/source/Host/windows/FileSystem.cpp
===================================================================
--- lldb/source/Host/windows/FileSystem.cpp
+++ lldb/source/Host/windows/FileSystem.cpp
@@ -101,6 +101,8 @@
std::wstring wpath;
if (!llvm::ConvertUTF8toWide(path, wpath))
return -1;
+ // All other bits are rejected by _wsopen_s
+ mode = mode & (_S_IREAD | _S_IWRITE);
int result;
::_wsopen_s(&result, wpath.c_str(), flags, _SH_DENYNO, mode);
return result;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156817.554679.patch
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230830/3e7b1084/attachment-0001.bin>
More information about the lldb-commits
mailing list