Reviewers: Vitaly Repeshko, danno, Paul Lind,

Message:
We ran into this issue when tried to fix the test-locker failures on MIPS, which
were caused by too many threads on some boards.

Related commit:
http://codereview.chromium.org/8506008/

Description:
Tighten handling of pthread_create errors on Linux.

The return value of pthread_create is now checked to be 0.
Tests on MIPS boards had some silent and hard to find timeouts and errors
related to this.
This ensures a proper error message and shutdown if a thread could not be
started.

BUG=
TEST=


Please review this at http://codereview.chromium.org/8497041/

Affected files:
  M src/platform-linux.cc


Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index 90f45dd163a22efc39e9a45d13bc70a91f892edc..c7f83bc114fd23cde925942767d06f650f12b389 100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -768,8 +768,8 @@ void Thread::Start() {
     pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_));
     attr_ptr = &attr;
   }
-  pthread_create(&data_->thread_, attr_ptr, ThreadEntry, this);
-  ASSERT(data_->thread_ != kNoThread);
+ int result = pthread_create(&data_->thread_, attr_ptr, ThreadEntry, this);
+  CHECK_EQ(0, result);
 }




--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to