aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org>2014-09-24 18:44:38 +0000
committerthestig@chromium.org <thestig@chromium.org>2014-09-24 18:44:38 +0000
commit75690d56b26ce3f8a1c3ba822f4223eab009fde6 (patch)
tree56953a2a7994dfe813b6f1ed6e8afa0d9ef8c52f /src
parentIWYU in minidump_writer.cc to fix building with libc++ after r1385. (diff)
downloadbreakpad-75690d56b26ce3f8a1c3ba822f4223eab009fde6.tar.xz
Fix some nits raised by Timur for r1385.
R=ivanpe@chromium.org Review URL: https://breakpad.appspot.com/1734002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1387 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/handler/exception_handler.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index db2f1e62..7cad7756 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -149,9 +149,8 @@ void InstallAlternateStackLocked() {
// one is too small.
if (sys_sigaltstack(NULL, &old_stack) == -1 || !old_stack.ss_sp ||
old_stack.ss_size < kSigStackSize) {
- new_stack.ss_sp = malloc(kSigStackSize);
+ new_stack.ss_sp = calloc(1, kSigStackSize);
new_stack.ss_size = kSigStackSize;
- memset(new_stack.ss_sp, 0, kSigStackSize);
if (sys_sigaltstack(&new_stack, NULL) == -1) {
free(new_stack.ss_sp);
@@ -188,7 +187,7 @@ void RestoreAlternateStackLocked() {
stack_installed = false;
}
-// The global exception handler stack. This is need because there may exist
+// The global exception handler stack. This is needed because there may exist
// multiple ExceptionHandler instances in a process. Each will have itself
// registered in this stack.
std::vector<ExceptionHandler*>* g_handler_stack_ = NULL;