Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 2573 invoked from network); 19 Dec 2007 14:39:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2007 14:39:04 -0000 Received: (qmail 96152 invoked by uid 500); 19 Dec 2007 14:38:53 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 96144 invoked by uid 500); 19 Dec 2007 14:38:53 -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 96129 invoked by uid 99); 19 Dec 2007 14:38:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Dec 2007 06:38:53 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Wed, 19 Dec 2007 14:38:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 402B0714281 for ; Wed, 19 Dec 2007 06:38:43 -0800 (PST) Message-ID: <30959285.1198075123260.JavaMail.jira@brutus> Date: Wed, 19 Dec 2007 06:38:43 -0800 (PST) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Resolved: (STDCXX-666) [MSVC 8-x64] 21.string.cons.cpp test fails in optimized builds due to bad codegeneration by the compiler In-Reply-To: <15033357.1195046563205.JavaMail.jira@brutus> 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-666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Farid Zaripov resolved STDCXX-666. ---------------------------------- Resolution: Fixed The issue resolved thus resolving the STDCXX-226. > [MSVC 8-x64] 21.string.cons.cpp test fails in optimized builds due to bad codegeneration by the compiler > -------------------------------------------------------------------------------------------------------- > > Key: STDCXX-666 > URL: https://issues.apache.org/jira/browse/STDCXX-666 > Project: C++ Standard Library > Issue Type: Bug > Components: Tests > Affects Versions: 4.2.0 > Environment: MSVC 8.0-x64, builds 8{d|s}, 12{d|s} > Reporter: Farid Zaripov > Assignee: Farid Zaripov > Fix For: 4.2.1 > > > The 21.string.cons.cpp test fails with 16 assertions on 64-bit MSVC in optimized builds. > The reason is the bad codegeneration in __rw_new_capacity() inlined in std::basic_string ctors. Because of this bug the __rw_new_capacity(0, const std::basic_string<> *) returns value greater that size_max() and ctor throws exception. > The temporary workaround might be definition of the __rw_new_capacity() as __declspec (noinline). > ------------------------------ > Index: include/string > =================================================================== > --- include/string (revision 593511) > +++ include/string (working copy) > @@ -1528,8 +1528,13 @@ > // more specialized version for basic_string<>; may be further specialized // in user code for example on a user-defined allocator > > +#if !defined (_WIN64) || !defined (_MSC_VER) || defined > (__INTEL_COMPILER) > template inline _RWSTD_STRING_SIZE_TYPE > +#else // _WIN64 && _MSC_VER && !__INTEL_COMPILER > +template __declspec > +(noinline) _RWSTD_STRING_SIZE_TYPE > +#endif // !_WIN64 || !_MSC_VER || __INTEL_COMPILER > __rw_new_capacity (_RWSTD_STRING_SIZE_TYPE __size, > const _STD::basic_string<_CharT, _Traits, > _Allocator>*) > { > ------------------------------ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.