Ticket #12215: boost_1_61_0-context-init-stack.patch

File boost_1_61_0-context-init-stack.patch, 586 bytes (added by runningwithscythes@…, 6 years ago)

patch to initialize stack memory

  • boost/context/fixedsize_stack.hpp

    diff --git a/boost/context/fixedsize_stack.hpp b/boost/context/fixedsize_stack.hpp
    index 681de40..32fef70 100644
    a b  
    99
    1010#include <cstddef>
    1111#include <cstdlib>
     12#include <cstring>
    1213#include <new>
    1314
    1415#include <boost/assert.hpp>
    public:  
    4748        void * vp = std::malloc( size_);
    4849        if ( ! vp) throw std::bad_alloc();
    4950
     51        std::memset(vp, 0, size_);
     52
    5053        stack_context sctx;
    5154        sctx.size = size_;
    5255        sctx.sp = static_cast< char * >( vp) + sctx.size;