[all-commits] [llvm/llvm-project] b6ae89: [lldb/PlatformDarwin] Always delete destination fi...
fredriss via All-commits
all-commits at lists.llvm.org
Mon Mar 23 14:35:11 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b6ae8937e031cde2e70e6a83d46c21e940fdf4ac
https://github.com/llvm/llvm-project/commit/b6ae8937e031cde2e70e6a83d46c21e940fdf4ac
Author: Fred Riss <friss at apple.com>
Date: 2020-03-23 (Mon, 23 Mar 2020)
Changed paths:
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
Log Message:
-----------
[lldb/PlatformDarwin] Always delete destination file first in PutFile
Summary:
The default behavior of Platform::PutFile is to open the file and
truncate it if it already exists. This works fine and is a sensible
default, but it interacts badly with code-signing on iOS, as doing so
invalidates the signature of the file (even if the new content has a
valid code signature).
We have a couple tests which on purpose reload a different binary with
the same name. Those tests are currently broken because of the above
interaction.
This patch simply makes the Darwin platform unconditionally delete the
destination file before sending the new one to work around this issue.
Reviewers: jasonmolenda
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D76450
More information about the All-commits
mailing list