From: James Cowgill Date: Fri, 12 Jan 2018 21:26:03 +0000 (+0100) Subject: Increase MTasker stacksize X-Git-Tag: dnsdist-1.3.0~128^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e27e7823e2487c59e190d735afe1f94f8cef56b4;p=pdns 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. --- 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(); }