vp-build/srcpkgs/electron9/files/musl-patches/chromium-musl-default-pthre...

32 lines
1.5 KiB
Diff

diff --git a/base/threading/platform_thread_linux.cc b/base/threading/platform_thread_linux.cc
index 095c49b..5044bb8 100644
--- a/base/threading/platform_thread_linux.cc
+++ b/base/threading/platform_thread_linux.cc
@@ -186,7 +186,7 @@ void TerminateOnThread() {}
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
#if !defined(THREAD_SANITIZER)
- return 0;
+ return (1 << 23);
#else
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
// default stack size isn't enough for some browser tests.
diff --git a/chrome/app/shutdown_signal_handlers_posix.cc b/chrome/app/shutdown_signal_handlers_posix.cc
index 621d441..be21106 100644
--- a/chrome/app/shutdown_signal_handlers_posix.cc
+++ b/chrome/app/shutdown_signal_handlers_posix.cc
@@ -187,11 +187,11 @@ void InstallShutdownSignalHandlers(
g_shutdown_pipe_read_fd = pipefd[0];
g_shutdown_pipe_write_fd = pipefd[1];
#if !defined(ADDRESS_SANITIZER)
- const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 *8;
#else
// ASan instrumentation bloats the stack frames, so we need to increase the
// stack size to avoid hitting the guard page.
- const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 *8;
#endif
ShutdownDetector* detector = new ShutdownDetector(
g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner);