Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 69973 invoked from network); 14 Nov 2007 13:23:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Nov 2007 13:23:06 -0000 Received: (qmail 8786 invoked by uid 500); 14 Nov 2007 13:22:54 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 8717 invoked by uid 500); 14 Nov 2007 13:22: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 8704 invoked by uid 99); 14 Nov 2007 13:22:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2007 05:22: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, 14 Nov 2007 13:23:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 32EA071424A for ; Wed, 14 Nov 2007 05:22:43 -0800 (PST) Message-ID: <15033357.1195046563205.JavaMail.jira@brutus> Date: Wed, 14 Nov 2007 05:22:43 -0800 (PST) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Created: (STDCXX-666) [MSVC 8-x64] 21.string.cons.cpp test fails in optimized builds due to bad codegeneration by the compiler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [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 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.