2017-03-02 15:12:46 +01:00
|
|
|
--- base/threading/platform_thread_linux.cc.orig
|
|
|
|
+++ base/threading/platform_thread_linux.cc
|
2016-08-30 21:42:48 +02:00
|
|
|
@@ -99 +99,2 @@ size_t GetDefaultThreadStackSize(const p
|
|
|
|
- return 0;
|
|
|
|
+ // use 8mb like glibc to avoid running out of space
|
|
|
|
+ return (1 << 23);
|
2017-05-01 17:57:07 +02:00
|
|
|
--- 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];
|
2017-03-02 15:12:46 +01:00
|
|
|
#if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS)
|
|
|
|
+# if defined(__GLIBC__)
|
2017-05-01 17:57:07 +02:00
|
|
|
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
|
2017-03-02 15:12:46 +01:00
|
|
|
+# else
|
2017-05-01 17:57:07 +02:00
|
|
|
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
2017-03-02 15:12:46 +01:00
|
|
|
+# endif
|
|
|
|
#else
|
2017-05-01 17:57:07 +02:00
|
|
|
// 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.
|
2017-03-02 15:12:46 +01:00
|
|
|
+# if defined(__GLIBC__)
|
2017-05-01 17:57:07 +02:00
|
|
|
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
|
2017-03-02 15:12:46 +01:00
|
|
|
+# else
|
2017-05-01 17:57:07 +02:00
|
|
|
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
2017-03-02 15:12:46 +01:00
|
|
|
+# endif
|
|
|
|
#endif
|
2017-05-01 17:57:07 +02:00
|
|
|
ShutdownDetector* detector = new ShutdownDetector(
|
|
|
|
g_shutdown_pipe_read_fd, shutdown_callback, task_runner);
|