Home Dashboard Directory Help
Search

Crash in C++ runtime when compiling with /MDd and /vd2 switch by marled


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 565500
Opened: 6/7/2010 7:02:33 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

I have actually the same problem, which is described in
http://social.msdn.microsoft.com/forums/en-us/vclanguage/thread/BDA1C363-7A9A-4094-B53E-A0C190892AD0
or in
http://www.mail-archive.com/gtkmm-list@gnome.org/msg11452.html
.
Details
Sign in to post a comment.
Posted by Microsoft on 6/7/2011 at 5:53 PM
Because this fix involves changing the layout of stringstream/etc., it breaks binary compatibility, which means that it can NEVER be hotfixed in VC10 or earlier. We intentionally break binary compatibility between major versions (which gives us the freedom to fix things exactly like this), but we preserve it in service packs and hotfixes.

I know you'd like to have the fix sooner than VC11, but I can't do anything more.

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by popchoc on 6/7/2011 at 3:45 PM
So this won't ever be fixed in visual studio 2010?

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

File > New > Project
Template Visual C++ > Win32 > New Win32 Console Application
Click 'Finish' in Application Settings

Open properties (Alt+F7)
Configuration properties > C/C++ > Command Line
Add /vd2 and click 'OK'


#include "stdafx.h"
#include <fstream>

int _tmain(int argc, _TCHAR* argv[])
{
    {
         std::ifstream testnul( _T("NUL") );
    }
    return 0;
}


First-chance exception at 0x56a88a4f (msvcp100d.dll) in test vd2.exe: 0xC0000005: Access violation reading location 0x00000004.
Unhandled exception at 0x56a88a4f (msvcp100d.dll) in test vd2.exe: 0xC0000005: Access violation reading location 0x00000004.


Thanks,

Jay Satiro on behalf of the Workrave project
Posted by Microsoft on 10/30/2010 at 9:52 PM
Hi,

Thanks for reporting this bug. We've fixed it, and the fix will appear in VC11. The Standard Library, including stringstream, should now work correctly under /vd2.

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by marled on 6/9/2010 at 11:08 PM
I have uploaded a test project with the correct project settings. The crash occurs in the destructor of the stringstream. The code is taken from the first link shown above.
Posted by Microsoft on 6/7/2010 at 11:39 PM
Thanks for reporting this issue. In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

Please give us a demo project to demonstrate this issue so that we can conduct further research.

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 6/7/2010 at 5:03 PM
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  
testproject.zip (restricted) 6/9/2010 -