|
Boost Users : |
Subject: Re: [Boost-users] [corountine2/context] forced_unwind exception on Windows with TDM-GCC
From: Gavin Lambert (boost_at_[hidden])
Date: 2018-12-14 06:44:08
On 14/12/2018 16:16, Hao Jiang wrote:
> I am porting my program from Linux to Windows with boost coroutine2. I
> found 32bit program throwing boost::context::detail::forced_unwind every
> time when coroutine destructed. But 64bit program works like charm.
>
> terminate called after throwing an instance of
> 'boost::context::detail::forced_unwind'
Are you trying to compile with exceptions disabled or something?
forced_unwind is part of the internal plumbing of Boost.Context and can
be thrown from any yield point when the coroutine is destroyed while
suspended. It's required that this exception is not swallowed and the
whole call stack between the yield point and the "outside" of the
coroutine is not noexcept.
Having said that, I would think that normally that particular example
should run to completion and not leave the coroutine suspended, so I
wouldn't expect that exception there. Have you checked whether perhaps
some other error is occurring first and then being "covered up" by the
unwind?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net