Search

Compiler Crash related to System.Core and String^ by Tod_

Closed
as Fixed Help for as Fixed

3
0
Sign in
to vote
Type: Bug
ID: 629060
Opened: 12/6/2010 2:40:46 PM
Access Restriction: Public
1
Workaround(s)
2
User(s) can reproduce this bug
I have a bug in Visual Studio 2008 (but users of VS2010 report problems also) that causes the optimizing compiler to crash. I asked users on the forum to try and reproduce the bug and got positive results. You can see the thread here.
http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/96216cb9-54a2-447b-bff3-afbff6502c9f/

My actual version was VS 2008 Team Edition SP1
My quest to solve this issue started on a separate thread which has even more details.
http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/044cbc27-4be9-4cfd-a3c9-532f377c5b54/
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010

What category (if any) best represents this feedback?

Reliability

Steps to reproduce

Create a new System Console CLR project in C++
Add a reference to System.Core
Set Create/Use Precompiled Header to "Not Using Precompiled Headers" -IMPORTANT
Add the code shown below and hit CTRL-F7 - The compiler crashes at this point for me
Comment out the Line that starts with String^
Hit CTRL-F7 the code compiles.

NOTE: Step 3 is key to seeing this bug. You can modify the precompiled header setting from the Project->Properties menu. In the resulting dialog, select the Configuration Properties->C/C++->Precompiled Headers option in the left panel. Then the first option on the right can be changed with a drop down choice.




#include "stdafx.h"

using namespace System;
using namespace System::IO;
using namespace System::IO::Pipes;



int main(array<System::String ^> ^args)
{
NamedPipeServerStream^ pipe_stream = gcnew NamedPipeServerStream("test",PipeDirection::InOut);
String^ msg = String::Format("This will cause the compiler to crash {0} when System.Core is referenced",1);
Console::WriteLine(L"Hello World");
return 0;
}

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

fatal error C1001: An internal error has occured in the compiler.

Expected results

Expected a clean compile.
File Attachments
File Name Submitted By Submitted On File Size  
TestCompilerBug.zip 12/6/2010 2.51 MB
Sign in to post a comment.
Posted by Microsoft on 12/6/2010 at 6:49 PM
Thanks for your feedback.
We are routing 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 12/6/2010 at 4:37 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.
Posted by MichaelPB on 12/14/2010 at 5:02 AM
I installed the hotfix to KB976656 (which is not intended to fix C1001) and compilation worked.