Boost logo

Boost Users :

Subject: [Boost-users] [context] Crash in case of exception from a context
From: Tamas.Ruszkai_at_[hidden]
Date: 2015-03-10 10:32:21

I use boost::context to implement cooperative multitasking. At the moment
I use boost 1.57 on Windows 7 with VisualStudio 2013.

Everything works fine until I throw an exception from a context created by
"boost::context::make_fcontext(.......)". I have seen someone had the
same problem and it was caused by the Windows OS, that checks the
exception hierarchy in the stack and if it finds that the starting point
is not the one that should come from the OS then it terminates the
process. It suspects some malitious code that corrupted the stack.

This guy metioned in his blogpost, that this problem was solved in boost
1.53 ("Boost 1.53 has updated and fixed version of boost::context library
that addresses exactly this problem. "), but somehow I still have the same
thing in 1.57. Is there some special preprocessor flag (#define) that I
have to activate to get this fix?



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at