Re: [Boost-bugs] [Boost C++ Libraries] #12215: Boost.context: call stack corrupted on Windows using default fixedsize_stack

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12215: Boost.context: call stack corrupted on Windows using default fixedsize_stack
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-05-24 03:12:26


#12215: Boost.context: call stack corrupted on Windows using default
fixedsize_stack
-----------------------------------+---------------------
  Reporter: runningwithscythes@… | Owner: olli
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: context
   Version: Boost 1.61.0 | Severity: Problem
Resolution: fixed | Keywords:
-----------------------------------+---------------------

Comment (by Alan Wilkie <alan@…>):

 Replying to [comment:1 olli]:
> thx, fixed

 Just to round this out, I have been chasing the same (or very similar)
 issue and I think the root cause is the "fbr_strg" entry in the context is
 not being specifically initialised. When the initial context switch
 occurs, it picks up the unitialised value and writes it to the TIB
 (especially in debug builds where new memory is intialised to 0xCD). Some
 Windows functions consult this value and use it if it's not zero.

 Initialising the allocated stack space also zeroes the context and fixes
 the problem. I think it should also be possible to fix by setting
 fbr_strg to zero in make_x86_64_ms_pe_masm.asm and
 make_i386_ms_pe_masm.asm.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12215#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC