Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 61854 invoked from network); 25 Aug 2009 22:01:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Aug 2009 22:01:41 -0000 Received: (qmail 88405 invoked by uid 500); 25 Aug 2009 22:02:06 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 88325 invoked by uid 500); 25 Aug 2009 22:02:06 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 88315 invoked by uid 99); 25 Aug 2009 22:02:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 22:02:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of msebor@gmail.com designates 209.85.222.190 as permitted sender) Received: from [209.85.222.190] (HELO mail-pz0-f190.google.com) (209.85.222.190) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2009 22:01:55 +0000 Received: by pzk28 with SMTP id 28so2212376pzk.27 for ; Tue, 25 Aug 2009 15:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=faWoZZw38oWlYO5ECgRHUlXcsrcjpb8Fpikn0QuBBj8=; b=S4C0DkmVA95i5+xaYsww1Imhp1f1hhc+glfqSkaPZS8hHHaXC/3qjcOqmyReYNlCi3 YyVS4VI2U/XInDyh6J2gHkyrfCaPC/NwHgPJS9KHlPrleiOaPX2sMg2nlGpsIT9Isuf2 zdjMGm9RsH2HIX8thGvOFT7ZdLI6ub7kLxEfY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=pmK5ykRod8oghUayCvGs7CgxdwUcc/JT3xAJZkv++Wb3Dg8hcRwVtQr6OnJivdnzeR sJ1kR+u2jSZ5o6IpMw8yOMpcOvNYzo0D0PJ7Ksaec5mn4tR6y0XDr9Z1BI1BBzrtSJrE 6IZIUZL8tIoZ2HI1+XlG76r1yDiGhiifwNLVk= Received: by 10.115.3.6 with SMTP id f6mr8553226wai.22.1251237694123; Tue, 25 Aug 2009 15:01:34 -0700 (PDT) Received: from localhost.localdomain (c-71-229-200-170.hsd1.co.comcast.net [71.229.200.170]) by mx.google.com with ESMTPS id l28sm476304waf.53.2009.08.25.15.01.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Aug 2009 15:01:33 -0700 (PDT) Message-ID: <4A945F3B.1070803@gmail.com> Date: Tue, 25 Aug 2009 16:01:31 -0600 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: dev@stdcxx.apache.org Subject: Re: svn commit: r777603 - in /stdcxx/branches/4.2.x: etc/config/src/ src/ References: <5DCEC29B39C9485680EB5D853D05F264@kyiv.epam.com> In-Reply-To: <5DCEC29B39C9485680EB5D853D05F264@kyiv.epam.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 08/18/2009 02:53 AM, Farid Zaripov wrote: >>> Actually, the MSVC 10.0 beta libc contains dtor's for std::length_error >>> and std::logic_error only (at least in 15s configuration which I've > tested). >>> It is still beta for now, but I believe that these dtors will go to the >>> release. >>> >>> Or should I fill the bug report to Microsoft on that issue? >> >> That would be great, thanks! With dtors for arbitrary C++ Standard >> Library in their libc there's no way to build/use a third party >> implementation such as stdcxx. Imagine one of the dtors doing >> something to the class, e.g.: >> >> class length_error: runtime_error { // MSVC 10 definition >> char* data; >> public: >> virtual ~length_error () { delete[] data; } >> // ... >> } > > I've filled the issue to MS, but today they resolved this issue > with status "by design" :( That's very bad. In stdcxx, length_error and all other exception classes described outside of [lib.language.support] derive from an intermediate base class, __rw::__rw_exception, which takes care of memory management on their behalf. Failing to define the destructors of these classes and invoking those defined in MSVC's runtime library will, in addition to exposing programs to the risk mentioned above, bypass the memory management functions in stdcxx and lead to leaks. I'm not sure I understand what they are proposing we do in the MSVC bug report. Do you? Martin > > http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?Feedbac > kID=457862 > > Best Regards, > Farid Zaripov >