Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / November 2003

Tip: Looking for answers? Try searching our database.

bug in .Net Framework?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boris - 27 Oct 2003 19:11 GMT
char* str = "hello, World";

System::String* sys_str = new System::String(str);

Compile my c++ project in Release mode:

if I compile the above code with 'Program Database (/Zi)',
then it works fine.
if I disable 'Debug Information Format' (set
to 'Disable'), then it results in corrupted sys_str once
in a while.  E.g. If I ran the above code in a loop, it
corrupts it on 972 iteration, i.e. resulting sys_str = '  
llo, World'.  

Is this a bug in .Net Framework?  Has anyone experienced
similar problem?

thank you,
-Boris
Zach Kramer - 17 Nov 2003 04:15 GMT
Boris,

Is this on the 1.1 or 1.0 version of the .NET Framework??

I ran the following code on the 1.0 and 1.1 and did not see the problem
that you are describing:

int _tmain(void)
{

   Console::WriteLine(S"Start");
    // TODO: Please replace the sample code below with your own.
    for(int i = 0; i< 1500; i++)
    {
        char* str = "hello, World";
        System::String* sys_str = new System::String(str);
        Console::WriteLine(sys_str);
    }

   Console::WriteLine(S"Hello World");
   return 0;
}

I made sure that when I built the release build that Debug Infomation under
C/C++ was set to Disabled.

How were you detecting the corruption??  Could you post the code that you
were using to reproduce the problem.

Thanks,
Zach
Microsoft PSS

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.