From e27e7823e2487c59e190d735afe1f94f8cef56b4 Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Fri, 12 Jan 2018 22:26:03 +0100 Subject: [PATCH] Increase MTasker stacksize Throwing an exception uses libgcc's stack unwinder. On mips64el the unwinder will overflow the default stack size of 8K. In turn the return ucontext gets overwritten, resulting in a jump into garbage. --- pdns/mtasker.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/mtasker.hh b/pdns/mtasker.hh index 2014d5bca..313d18f29 100644 --- a/pdns/mtasker.hh +++ b/pdns/mtasker.hh @@ -110,7 +110,7 @@ public: This limit applies solely to the stack, the heap is not limited in any way. If threads need to allocate a lot of data, the use of new/delete is suggested. */ - MTasker(size_t stacksize=8192) : d_tid(0), d_maxtid(0), d_stacksize(stacksize), d_waitstatus(Error) + MTasker(size_t stacksize=16*8192) : d_tid(0), d_maxtid(0), d_stacksize(stacksize), d_waitstatus(Error) { initMainStackBounds(); } -- 2.40.0