forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GWP-ASan: Add Linux crash handler support
Linux crashpad support is now sufficiently enabled to allow running the GWP-ASan crash handler unit tests under Linux. (The client tests are still blocked on allocator shim updates.) Change-Id: I409cebaa9cdaed5da546266d0af470d2b25a09ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610605 Auto-Submit: Vlad Tsyrklevich <vtsyrklevich@chromium.org> Commit-Queue: Vitaly Buka <vitalybuka@chromium.org> Reviewed-by: Vitaly Buka <vitalybuka@chromium.org> Cr-Commit-Position: refs/heads/master@{#659296}
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2019 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "components/gwp_asan/crash_handler/crash_analyzer.h" | ||
|
||
#include <signal.h> | ||
|
||
#include "third_party/crashpad/crashpad/snapshot/exception_snapshot.h" | ||
|
||
namespace gwp_asan { | ||
namespace internal { | ||
|
||
crashpad::VMAddress CrashAnalyzer::GetAccessAddress( | ||
const crashpad::ExceptionSnapshot& exception) { | ||
if (exception.Exception() != SIGSEGV && exception.Exception() != SIGBUS) | ||
return 0; | ||
|
||
return exception.ExceptionAddress(); | ||
} | ||
|
||
} // namespace internal | ||
} // namespace gwp_asan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters