Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: base/debug/stack_trace_posix.cc

Issue 2315403002: Force crash on Mac10.9- in BreakDebugger() (Closed)
Patch Set: - Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/debug/stack_trace.h" 5 #include "base/debug/stack_trace.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <signal.h> 9 #include <signal.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 if ((i + 1) % 4 == 0) 367 if ((i + 1) % 4 == 0)
368 PrintToStderr("\n"); 368 PrintToStderr("\n");
369 } 369 }
370 PrintToStderr("\n"); 370 PrintToStderr("\n");
371 #endif // ARCH_CPU_X86_FAMILY 371 #endif // ARCH_CPU_X86_FAMILY
372 #endif // defined(OS_LINUX) 372 #endif // defined(OS_LINUX)
373 373
374 PrintToStderr("[end of stack trace]\n"); 374 PrintToStderr("[end of stack trace]\n");
375 375
376 #if defined(OS_MACOSX) && !defined(OS_IOS) 376 #if defined(OS_MACOSX) && !defined(OS_IOS)
377 if (::signal(signal, SIG_DFL) == SIG_ERR) 377 ::signal(signal, SIG_DFL);
dcheng 2016/09/09 05:15:50 Why is this change necessary as well?
Xianzhu 2016/09/09 05:20:13 Without this, the forced crash will be ignored. A
378 _exit(1); 378 _exit(1);
379 #else 379 #else
380 // Non-Mac OSes should probably reraise the signal as well, but the Linux 380 // Non-Mac OSes should probably reraise the signal as well, but the Linux
381 // sandbox tests break on CrOS devices. 381 // sandbox tests break on CrOS devices.
382 // https://code.google.com/p/chromium/issues/detail?id=551681 382 // https://code.google.com/p/chromium/issues/detail?id=551681
383 _exit(1); 383 _exit(1);
384 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 384 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
385 } 385 }
386 386
387 class PrintBacktraceOutputHandler : public BacktraceOutputHandler { 387 class PrintBacktraceOutputHandler : public BacktraceOutputHandler {
388 public: 388 public:
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 *ptr = *start; 805 *ptr = *start;
806 *start++ = ch; 806 *start++ = ch;
807 } 807 }
808 return buf; 808 return buf;
809 } 809 }
810 810
811 } // namespace internal 811 } // namespace internal
812 812
813 } // namespace debug 813 } // namespace debug
814 } // namespace base 814 } // namespace base
OLDNEW
« no previous file with comments | « base/debug/debugger_posix.cc ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698