diff --git a/boost/context/fixedsize_stack.hpp b/boost/context/fixedsize_stack.hpp index 681de40..32fef70 100644 --- a/boost/context/fixedsize_stack.hpp +++ b/boost/context/fixedsize_stack.hpp @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -47,6 +48,8 @@ public: void * vp = std::malloc( size_); if ( ! vp) throw std::bad_alloc(); + std::memset(vp, 0, size_); + stack_context sctx; sctx.size = size_; sctx.sp = static_cast< char * >( vp) + sctx.size;