If create WinForm application (C++ Project), then switch compilef from /clr:pure to /clr,and add cpp file to project and remove /clr for it. We get crash after lunch application if try to create fstream object. You can see sample below:// test_fstr.cpp#ifdef _MANAGED#pragma unmanaged#endif#include <fstream>#include <iostream>int f1(void){ std::ofstream of; return 0; }When application crash we recive next call stack--------------------------------------------------------------------------------*1 msvcr100d.dll!_msize_dbg(void * pUserData=0xc071e859, int nBlockUse=2) 2 msvcr100d.dll!_dllonexit_nolock(int (void)* func=0xc03197f9, void (void)* * * pbegin=0x0013e930, void (void)* * * pend=0x0013e928) 3 msvcr100d.dll!__dllonexit(int (void)* func=0xc03197f9, void (void)* * * pbegin=0x0013e930, void (void)* * * pend=0x0013e928) 4 test.exe!_onexit(int (void)* func=0x00407fa0) 5 test.exe!atexit(void (void)* func=0x00407fa0) 6 test.exe!std::`dynamic initializer for '_Fac_tidy_reg''() 7 [Внешний код] 8 test.exe!_initterm(void** pfbegin = 0x004081BC, void pfend = ) 9 test.exe!<CrtImplementationDetails>::LanguageSupport::InitializeNative() 10 test.exe!<CrtImplementationDetails>::LanguageSupport::_Initialize() 11 test.exe!<CrtImplementationDetails>::LanguageSupport::Initialize() 12 test.exe!?.cctor@@$$FYMXXZ() 13 mscoreei.dll!603b55ab() 14 [Указанные ниже фреймы могут быть неверны и (или) отсутствовать, символы для mscoreei.dll не загружены] 15 mscoree.dll!79007f16() 16 mscoree.dll!79004de3() 17 kernel32.dll!7c817067() ----------------------6 test.exe!std::`dynamic initializer for '_Fac_tidy_reg''() ->_STD_BEGINstruct _Fac_tidy_reg_t { ~_Fac_tidy_reg_t() { ::_Fac_tidy(); } };_AGLOBAL const _Fac_tidy_reg_t _Fac_tidy_reg;....-------------Problem with initialize Struct _Fac_tidy_reg (CLI/Native)If come back /clr for it file then all OK.It test under vc9 toolset and .Net 3.5 is OK.
Visual Studio/Silverlight/Tooling version
What category (if any) best represents this feedback?
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results