From 6d3d99f3a113afa52fff3e7d808c387e2aaf794b Mon Sep 17 00:00:00 2001 From: bjovke Date: Fri, 14 Apr 2017 11:54:51 +0200 Subject: [PATCH] Problem: Stack overflow in Windows VS 2012 builds for simple ZeroMQ usage. Solution: Added notice in INSTALL file to mandatory use at least 2 MB stack size in VS 2012 and recommendation to use at least 2 MB in all other Windows builds. --- INSTALL | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/INSTALL b/INSTALL index df56b82e28..b21b7cb480 100644 --- a/INSTALL +++ b/INSTALL @@ -46,6 +46,16 @@ cmake -H. -B -G"Visual Studio 14 2015 Win64" \ -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 \ -DENABLE_CURVE=OFF -DZMQ_BUILD_TESTS=OFF +In VS 2012 it is mandatory to increase the default stack size of 1 MB to +at least 2 MB due to implementation of std::map intermittently requiring +substantial amount of stack and causing stack overflow. ZeroMQ generally +needs more stack when FD_SETSIZE is higher. +In all Windows builds it is recommended to start with at least 2 MB stack +size unless application using ZeroMQ is using large number of threads which +can cause substantial consumption of virtual address space, especially if +32 bit build is used. +Generally, programmer needs to tune the stack to balance memory consumption +but never get into situation that stack is overflown. Basic Installation ==================