]> granicus.if.org Git - pdns/commitdiff
Increase MTasker stacksize
authorJames Cowgill <jcowgill@debian.org>
Fri, 12 Jan 2018 21:26:03 +0000 (22:26 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Thu, 29 Mar 2018 17:27:45 +0000 (19:27 +0200)
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

index 2014d5bcae6566109a492bab28ae9404253a7237..313d18f290930e963475bd8090d4ba2152f39b4f 100644 (file)
@@ -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();
   }