| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 trace.OutputToStream(&os); | 145 trace.OutputToStream(&os); |
| 146 VLOG(1) << os.str(); | 146 VLOG(1) << os.str(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 // The test is used for manual testing, e.g., to see the raw output. | 149 // The test is used for manual testing, e.g., to see the raw output. |
| 150 TEST_F(StackTraceTest, DebugPrintBacktrace) { | 150 TEST_F(StackTraceTest, DebugPrintBacktrace) { |
| 151 StackTrace().Print(); | 151 StackTrace().Print(); |
| 152 } | 152 } |
| 153 #endif // !defined(__UCLIBC__) | 153 #endif // !defined(__UCLIBC__) |
| 154 | 154 |
| 155 #if defined(OS_POSIX) && !defined(OS_ANDROID) | 155 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) |
| 156 #if !defined(OS_IOS) | 156 #if !defined(OS_IOS) |
| 157 static char* newArray() { | 157 static char* newArray() { |
| 158 // Clang warns about the mismatched new[]/delete if they occur in the same | 158 // Clang warns about the mismatched new[]/delete if they occur in the same |
| 159 // function. | 159 // function. |
| 160 return new char[10]; | 160 return new char[10]; |
| 161 } | 161 } |
| 162 | 162 |
| 163 MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) { | 163 MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) { |
| 164 char* pointer = newArray(); | 164 char* pointer = newArray(); |
| 165 delete pointer; | 165 delete pointer; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 TEST_F(StackTraceTest, MAYBE_TraceStackFramePointers) { | 300 TEST_F(StackTraceTest, MAYBE_TraceStackFramePointers) { |
| 301 constexpr size_t kDepth = 5; | 301 constexpr size_t kDepth = 5; |
| 302 const void* frames[kDepth]; | 302 const void* frames[kDepth]; |
| 303 ExpectStackFramePointers<kDepth>(frames, kDepth); | 303 ExpectStackFramePointers<kDepth>(frames, kDepth); |
| 304 } | 304 } |
| 305 | 305 |
| 306 #endif // HAVE_TRACE_STACK_FRAME_POINTERS | 306 #endif // HAVE_TRACE_STACK_FRAME_POINTERS |
| 307 | 307 |
| 308 } // namespace debug | 308 } // namespace debug |
| 309 } // namespace base | 309 } // namespace base |
| OLD | NEW |