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

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

Issue 2735113003: Changing SpawnChild to return a struct.
Patch Set: Created 3 years, 9 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/android/parcelable_channel_server.cc ('k') | base/files/file_locking_unittest.cc » ('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) 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 char* pointer = newArray(); 164 char* pointer = newArray();
165 delete pointer; 165 delete pointer;
166 return 2; 166 return 2;
167 } 167 }
168 168
169 // Regression test for StackDumpingSignalHandler async-signal unsafety. 169 // Regression test for StackDumpingSignalHandler async-signal unsafety.
170 // Combined with tcmalloc's debugallocation, that signal handler 170 // Combined with tcmalloc's debugallocation, that signal handler
171 // and e.g. mismatched new[]/delete would cause a hang because 171 // and e.g. mismatched new[]/delete would cause a hang because
172 // of re-entering malloc. 172 // of re-entering malloc.
173 TEST_F(StackTraceTest, AsyncSignalUnsafeSignalHandlerHang) { 173 TEST_F(StackTraceTest, AsyncSignalUnsafeSignalHandlerHang) {
174 Process child = SpawnChild("MismatchedMallocChildProcess"); 174 SpawnChildResult spawn_result = SpawnChild("MismatchedMallocChildProcess");
175 Process child = std::move(spawn_result.process);
175 ASSERT_TRUE(child.IsValid()); 176 ASSERT_TRUE(child.IsValid());
176 int exit_code; 177 int exit_code;
177 ASSERT_TRUE(child.WaitForExitWithTimeout(TestTimeouts::action_timeout(), 178 ASSERT_TRUE(child.WaitForExitWithTimeout(TestTimeouts::action_timeout(),
178 &exit_code)); 179 &exit_code));
179 } 180 }
180 #endif // !defined(OS_IOS) 181 #endif // !defined(OS_IOS)
181 182
182 namespace { 183 namespace {
183 184
184 std::string itoa_r_wrapper(intptr_t i, size_t sz, int base, size_t padding) { 185 std::string itoa_r_wrapper(intptr_t i, size_t sz, int base, size_t padding) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 #endif 311 #endif
311 312
312 TEST_F(StackTraceTest, MAYBE_StackEnd) { 313 TEST_F(StackTraceTest, MAYBE_StackEnd) {
313 EXPECT_NE(0u, GetStackEnd()); 314 EXPECT_NE(0u, GetStackEnd());
314 } 315 }
315 316
316 #endif // HAVE_TRACE_STACK_FRAME_POINTERS 317 #endif // HAVE_TRACE_STACK_FRAME_POINTERS
317 318
318 } // namespace debug 319 } // namespace debug
319 } // namespace base 320 } // namespace base
OLDNEW
« no previous file with comments | « base/android/parcelable_channel_server.cc ('k') | base/files/file_locking_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698