Home Dashboard Directory Help
Search

Crash with empty std::function assignment by Frédérick Beaupré


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 779047
Opened: 2/12/2013 7:59:44 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

There is a nasty crash with the implementation of std::function by Microsoft.

When assigning an empty function object taking a derived class pointer as a parameter to another function object taking a base class pointer as a parameter, the emptyness of the function object is lost. The result is that the function object usage is undefined.

This should not crash. We have tested it with some other compilers (gcc) and this code compiles and runs without crashing.

Please help us with that. We use both VS2010 and VS2012 and both have the bug despite the very different std::function implementation.
Details
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:29 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 5/22/2013 at 5:52 PM
Hi again,

We've fixed this bug, and the fix will be available in VC12 RTM.

Reminder: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by Microsoft on 3/26/2013 at 12:36 AM
Hi,

Thanks for reporting this bug. I wanted to let you know what's happening with it. I'm still keeping track of it, but it's been resolved as "Deferred" because we may not have time to fix it in VC12. (Note: VC8 = VS 2005, VC9 = VS 2008, VC10 = VS 2010, VC11 = VS 2012.)

Note: Connect doesn't notify me about comments. If you have any further questions, please E-mail me.

Stephan T. Lavavej
Senior Developer - Visual C++ Libraries
stl@microsoft.com
Posted by Microsoft on 2/12/2013 at 6:45 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 2/12/2013 at 8:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
stdfunctioncrash.cpp 2/12/2013 306 bytes