commit | 2071abaeb4deac03c5032581f758c0f20862adf2 | [log] [tgz] |
---|---|---|
author | Ben Hamilton <benhamilton@google.com> | Tue May 17 21:18:21 2022 |
committer | Crashpad LUCI CQ <crashpad-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed May 18 19:25:09 2022 |
tree | 543d4cce3ee150c191d173ca133187536ac17af2 | |
parent | 1fa6eb27f6999da18d4fa3584a3cc88949970f56 [diff] |
[ios] Fix FD leak in IOSIntermediateDumpWriter IOSIntermediateDumpWriter::Close() is intended to close the FD opened by the in-process handler. Currently, InProcessHandler::ScopedLockedWriter::~ScopedLockedWriter() does invoke IOSIntermediateDumpWriter::Close(). However, InProcessHandler::Initialize() invokes the utility CreateWriterWithPath() which directly creates an IOSIntermediateDumpWriter. It neither uses ScopedLockedWriter nor invokes Close(). This fixes the issue by: 1) Making IOSIntermediateDumpWriter::~IOSIntermediateDumpWriter() DCHECK() that it's closed 2) Calling IOSIntermediateDumpWriter::Close() from InProcessHandler::~InProcessHandler() and from test files Change-Id: Ibfede0a3d2aeac948c7ff3d56445e13d1a4028b5 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3648710 Commit-Queue: Justin Cohen <justincohen@chromium.org> Reviewed-by: Justin Cohen <justincohen@chromium.org>
Crashpad is a crash-reporting system.
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.