Author: Dmitry Vasilyev Date: 2024-05-14T13:57:37+04:00 New Revision: 7b1b1279414217ea7f2402a03dfb5a18ea5a5367
URL: https://github.com/llvm/llvm-project/commit/7b1b1279414217ea7f2402a03dfb5a18ea5a5367 DIFF: https://github.com/llvm/llvm-project/commit/7b1b1279414217ea7f2402a03dfb5a18ea5a5367.diff LOG: [lldb][Windows] Enforce exec permission using Platform::Install() from Windows host (#91887) Target::Install() set 0700 permissions for the main executable file. Platform::Install() just copies permissions from the source. But the permission eFilePermissionsUserExecute is missing on the Windows host. A lot of tests failed in case of Windows host and Linux target because of this issue. There is no API to provide the exec flag. This patch set the permission eFilePermissionsUserExecute for all files installed via Platform::Install() from the Windows host. It fixes a lot of tests in case of Windows host and Linux target. Added: Modified: lldb/source/Target/Platform.cpp Removed: ################################################################################ diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 4af4aa68ccd01..ee1f92470e162 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1225,7 +1225,7 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination, uint32_t permissions = source_file.get()->GetPermissions(error); if (permissions == 0) - permissions = lldb::eFilePermissionsFileDefault; + permissions = lldb::eFilePermissionsUserRWX; lldb::user_id_t dest_file = OpenFile( destination, File::eOpenOptionCanCreate | File::eOpenOptionWriteOnly | _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits