Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 66573 invoked from network); 1 Oct 2007 15:55:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2007 15:55:11 -0000 Received: (qmail 43894 invoked by uid 500); 1 Oct 2007 15:55:01 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 43880 invoked by uid 500); 1 Oct 2007 15:55:01 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 43869 invoked by uid 99); 1 Oct 2007 15:55:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 08:55:01 -0700 X-ASF-Spam-Status: No, hits=-98.8 required=10.0 tests=ALL_TRUSTED,DNS_FROM_DOB,RCVD_IN_DOB X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2007 15:55:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BFFE071420A for ; Mon, 1 Oct 2007 08:54:50 -0700 (PDT) Message-ID: <18490395.1191254090783.JavaMail.jira@brutus> Date: Mon, 1 Oct 2007 08:54:50 -0700 (PDT) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Closed: (STDCXX-79) [MSVC 7] operator new doesn't throw on failure In-Reply-To: <1965393328.1133400030452.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-79?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Farid Zaripov closed STDCXX-79. ------------------------------- Resolution: Won't Fix Since the Microsoft will not fix this bug, I'm closing the issue with resolution: Won't Fix. > [MSVC 7] operator new doesn't throw on failure > ---------------------------------------------- > > Key: STDCXX-79 > URL: https://issues.apache.org/jira/browse/STDCXX-79 > Project: C++ Standard Library > Issue Type: Bug > Components: External > Environment: MSVC 7.0, 7.1 > Reporter: Martin Sebor > Assignee: Farid Zaripov > Priority: Critical > > The implementation of operaror new in the MSVC 7 runtime library (but not the one in the C++ Standard Library, msvcprtd), fails to throw an exception on failure and instead returns 0. This works correctly in MSVC 8. > Here's a reference to the MSVC 7 documentation of their libraries: > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_c_run.2d.time_libraries.asp > $ cat t.cpp && cl /EHsc /MDd t.cpp /c && link /NODEFAULTLIB:msvcprtd t.obj && ./t > #include > #include > #include > 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) 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.