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;
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;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits