[ http://issues.apache.org/jira/browse/STDCXX-77?page=comments#action_12358986 ]
Martin Sebor commented on STDCXX-77: ------------------------------------ This seems to be caused by the way we link the executable. The same problem is reproducible with MSVC 7.1's native C++ Standard library when the msvcprtd library is avoided: $ cl /EHsc /MDd t.cpp /c && link /NODEFAULTLIB:msvcprtd t.obj && ./t Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86 Copyright (C) Microsoft Corporation 1984-2002. All rights reserved. t.cpp Microsoft (R) Incremental Linker Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. Assertion failed: success, file t.cpp, line 20 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. > [MSVC 7.1] operator new doesn't throw std::bad_alloc on failure > --------------------------------------------------------------- > > Key: STDCXX-77 > URL: http://issues.apache.org/jira/browse/STDCXX-77 > Project: STDCXX > Type: Bug > Components: 18. Language Support > Versions: 4.1.2 > Environment: MSVC 7.1 > Reporter: Martin Sebor > Assignee: Martin Sebor > > $ cat t.cpp && nmake t.exe && ./t > #include <cassert> > #include <new> > #include <crtdbg.h> > int main () > { > _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_DEBUG); > _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG); > _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_DEBUG); > int success = 0; > try { > operator new ((unsigned long)-1024); > } > catch (std::bad_alloc&) { success = 1; } > catch (...) { } > assert (success); > } > Microsoft (R) Program Maintenance Utility Version 7.10.3077 > Copyright (C) Microsoft Corporation. All rights reserved. > link -nologo /NODEFAULTLIB:msvcprtd /debug > /LIBPATH:.\..\..\..\..\lib /OUT:t.exe t.obj testx15d_msvc_7_1.lib > tlt15d_msvc_7_1.lib std15d_msvc_7_1.lib user32.lib > LINK : LNK6004: t.exe not found or not built by the last incremental link; > performing full link > Assertion failed: success, file t.cpp, line 20 > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
