aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/default-pthread-stacksize.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/chromium/default-pthread-stacksize.patch')
-rw-r--r--community/chromium/default-pthread-stacksize.patch36
1 files changed, 18 insertions, 18 deletions
diff --git a/community/chromium/default-pthread-stacksize.patch b/community/chromium/default-pthread-stacksize.patch
index 2b14c7bd43..75b50479e5 100644
--- a/community/chromium/default-pthread-stacksize.patch
+++ b/community/chromium/default-pthread-stacksize.patch
@@ -1,29 +1,29 @@
---- base/threading/platform_thread_linux.cc.orig 2016-08-30 21:36:06.809571185 +0200
-+++ base/threading/platform_thread_linux.cc 2016-08-30 21:36:14.582805286 +0200
+--- base/threading/platform_thread_linux.cc.orig
++++ base/threading/platform_thread_linux.cc
@@ -99 +99,2 @@ size_t GetDefaultThreadStackSize(const p
- return 0;
-+ // use 2mb to avoid running out of space
-+ return (2 * 1024 * 1024);
---- chrome/browser/chrome_browser_main_posix.cc.orig
-+++ chrome/browser/chrome_browser_main_posix.cc
-@@ -276,12 +276,20 @@
- g_shutdown_pipe_read_fd = pipefd[0];
- g_shutdown_pipe_write_fd = pipefd[1];
++ // use 8mb like glibc to avoid running out of space
++ return (1 << 23);
+--- chrome/app/shutdown_signal_handlers_posix.cc.orig
++++ chrome/app/shutdown_signal_handlers_posix.cc
+@@ -184,12 +184,20 @@
+ g_shutdown_pipe_read_fd = pipefd[0];
+ g_shutdown_pipe_write_fd = pipefd[1];
#if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS)
+# if defined(__GLIBC__)
- const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
+# else
-+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
++ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
+# endif
#else
- // ASan instrumentation and -finstrument-functions (used for keeping the
- // shadow stacks) bloat the stack frames, so we need to increase the stack
- // size to avoid hitting the guard page.
+ // ASan instrumentation and -finstrument-functions (used for keeping the
+ // shadow stacks) bloat the stack frames, so we need to increase the stack
+ // size to avoid hitting the guard page.
+# if defined(__GLIBC__)
- const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
+# else
-+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
++ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
+# endif
#endif
- // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so
- // if you change this, you'll probably need to change the suppression.
+ ShutdownDetector* detector = new ShutdownDetector(
+ g_shutdown_pipe_read_fd, shutdown_callback, task_runner);