42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
diff --git a/third_party/blink/renderer/platform/wtf/stack_util.cc b/third_party/blink/renderer/platform/wtf/stack_util.cc
|
|
index b242164..1a0b519 100644
|
|
--- a/third_party/blink/renderer/platform/wtf/stack_util.cc
|
|
+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc
|
|
@@ -28,7 +28,7 @@
|
|
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
|
// correctly for the main thread.
|
|
|
|
-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
defined(OS_FUCHSIA)
|
|
// pthread_getattr_np() can fail if the thread is not invoked by
|
|
// pthread_create() (e.g., the main thread of blink_unittests).
|
|
@@ -55,6 +55,9 @@ size_t GetUnderestimatedStackSize() {
|
|
pthread_attr_destroy(&attr);
|
|
#endif
|
|
|
|
+#if defined(OS_LINUX) && !defined(__GLIBC__)
|
|
+ return 0;
|
|
+#else
|
|
// Return a 512k stack size, (conservatively) assuming the following:
|
|
// - that size is much lower than the pthreads default (x86 pthreads has a 2M
|
|
// default.)
|
|
@@ -62,6 +65,8 @@ size_t GetUnderestimatedStackSize() {
|
|
// low as 512k.
|
|
//
|
|
return 512 * 1024;
|
|
+#endif
|
|
+
|
|
#elif defined(OS_MACOSX)
|
|
// pthread_get_stacksize_np() returns too low a value for the main thread on
|
|
// OSX 10.9,
|
|
@@ -97,7 +102,7 @@ return Threading::ThreadStackSize();
|
|
}
|
|
|
|
void* GetStackStart() {
|
|
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
|
defined(OS_FUCHSIA)
|
|
pthread_attr_t attr;
|
|
int error;
|