New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash while stack unwinding, if compiled by Visual Studio 2015 Upd.3 without / GL flag #14

Closed
DrKelwin opened this Issue Sep 14, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@DrKelwin

DrKelwin commented Sep 14, 2017

BoostCoroTest.zip
I've attached configured sample which crashes (*.sln and source file). Can be reproduced if this solution compiled on Release & x86 configuration. /O2 and /Ob2 are enabled, all other options are disabled. If /GL (in VS it calls: "Whole Program Optimization") is enabled all works fine.

I used Boost.Coroutine2 from boost 1.65.1.

@olk

This comment has been minimized.

Member

olk commented Sep 14, 2017

does it happen with context-impl=winfib (b2 command line property; uses Windows Fibers instead of assembler implementation) too?

@DrKelwin

This comment has been minimized.

DrKelwin commented Sep 25, 2017

Great! Thanks! context-impl=winfib helped. But it works only if link=static. If I changed to link=shared then I see errors like

"boost/context/continuation_winfib.hpp(66): error C2492: 'boost::context::detail::activation_record::current_rec': data with thread storage duration may not have dll interface".

Do you have any ideas how can I fix it? Maybe some preprocessor definitions will help or some other tricks...

@olk

This comment has been minimized.

Member

olk commented Sep 25, 2017

What tells the compiler if the you add BOOST_CONTEXT_DECL at the front (line 66)?

@olk

This comment has been minimized.

Member

olk commented Sep 26, 2017

From the error C2492 reference: "The address of the thread variable is not known until run time, so it cannot be linked to a DLL import or export."

@olk

This comment has been minimized.

Member

olk commented Oct 2, 2017

I've updated boost.context (branch develop). Could you check if the error regarding to the DLL interface has vanished?

@olk

This comment has been minimized.

Member

olk commented Oct 26, 2017

no, response - so closed

@olk olk closed this Oct 26, 2017

@jeking3

This comment has been minimized.

jeking3 commented Jun 17, 2018

It looks like we need to add Appveyor CI to validate things like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment