|
Boost : |
Subject: [boost] [context] make_fcontext stack pointer unclear from documentation
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2013-05-25 05:31:02
The function make_fcontext takes a stack pointer. However it is not
clear at all from the documentation that the stack pointer should
actually point to the end of the stack buffer. AFAICT it takes close
examination of the simple_stack_allocator helper in the examples folder
to figure this out. This led to several hours of debugging when I
naively passed in the pointer to the start of the stack buffer and
random application memory got stomped.
I guess you're supposed to glean it from the note at the bottom of the
stack allocation page [1].
This should at least be mentioned in the make_fcontext reference [2].
[1]
http://www.boost.org/doc/libs/1_53_0/libs/context/doc/html/context/stack.html
[2]
http://www.boost.org/doc/libs/1_53_0/libs/context/doc/html/context/context/boost_fcontext.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk