Index: src/platform-posix.cc |
diff --git a/src/platform-posix.cc b/src/platform-posix.cc |
index 797557d76f830cde51cb37943edce6f5d6f3504b..923cd8700ed9a062c8ed8ad7a505da253ae084dd 100644 |
--- a/src/platform-posix.cc |
+++ b/src/platform-posix.cc |
@@ -564,6 +564,9 @@ Thread::Thread(const Options& options) |
: data_(new PlatformData), |
stack_size_(options.stack_size()), |
start_semaphore_(NULL) { |
+ if (stack_size_ > 0 && stack_size_ < PTHREAD_STACK_MIN) { |
+ stack_size_ = PTHREAD_STACK_MIN; |
+ } |
set_name(options.name()); |
} |