| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 trace.OutputToStream(&os); | 146 trace.OutputToStream(&os); |
| 147 VLOG(1) << os.str(); | 147 VLOG(1) << os.str(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 // The test is used for manual testing, e.g., to see the raw output. | 150 // The test is used for manual testing, e.g., to see the raw output. |
| 151 TEST_F(StackTraceTest, DebugPrintBacktrace) { | 151 TEST_F(StackTraceTest, DebugPrintBacktrace) { |
| 152 StackTrace().Print(); | 152 StackTrace().Print(); |
| 153 } | 153 } |
| 154 #endif // !defined(__UCLIBC__) | 154 #endif // !defined(__UCLIBC__) |
| 155 | 155 |
| 156 #if defined(OS_POSIX) && !defined(OS_ANDROID) | 156 #if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) |
| 157 #if !defined(OS_IOS) | 157 #if !defined(OS_IOS) |
| 158 static char* newArray() { | 158 static char* newArray() { |
| 159 // Clang warns about the mismatched new[]/delete if they occur in the same | 159 // Clang warns about the mismatched new[]/delete if they occur in the same |
| 160 // function. | 160 // function. |
| 161 return new char[10]; | 161 return new char[10]; |
| 162 } | 162 } |
| 163 | 163 |
| 164 MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) { | 164 MULTIPROCESS_TEST_MAIN(MismatchedMallocChildProcess) { |
| 165 char* pointer = newArray(); | 165 char* pointer = newArray(); |
| 166 delete pointer; | 166 delete pointer; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 #endif | 311 #endif |
| 312 | 312 |
| 313 TEST_F(StackTraceTest, MAYBE_StackEnd) { | 313 TEST_F(StackTraceTest, MAYBE_StackEnd) { |
| 314 EXPECT_NE(0u, GetStackEnd()); | 314 EXPECT_NE(0u, GetStackEnd()); |
| 315 } | 315 } |
| 316 | 316 |
| 317 #endif // BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) | 317 #endif // BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS) |
| 318 | 318 |
| 319 } // namespace debug | 319 } // namespace debug |
| 320 } // namespace base | 320 } // namespace base |
| OLD | NEW |