Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 2931 invoked from network); 8 Dec 2005 21:26:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Dec 2005 21:26:32 -0000 Received: (qmail 34489 invoked by uid 500); 8 Dec 2005 21:26:32 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 34472 invoked by uid 500); 8 Dec 2005 21:26:32 -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 34461 invoked by uid 99); 8 Dec 2005 21:26:31 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Dec 2005 13:26:31 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 9D4E6191 for ; Thu, 8 Dec 2005 22:26:10 +0100 (CET) Message-ID: <1446928095.1134077170642.JavaMail.jira@ajax.apache.org> Date: Thu, 8 Dec 2005 22:26:10 +0100 (CET) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Closed: (STDCXX-25) string::insert() curruption inserting self In-Reply-To: <713272675.1126722655051.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/STDCXX-25?page=all ] Martin Sebor closed STDCXX-25: ------------------------------ Fix confirmed. > string::insert() curruption inserting self > ------------------------------------------ > > Key: STDCXX-25 > URL: http://issues.apache.org/jira/browse/STDCXX-25 > Project: STDCXX > Type: Bug > Components: 21. Strings > Versions: 4.1.2 > Environment: All > Reporter: Martin Sebor > Assignee: Martin Sebor > Fix For: 4.1.3 > Attachments: stdcxx-25.patch > > The program below aborts. According to 21.3.5.4, p16 of C++ '03, the effects of the insert member function template are "Equivalent to insert(p - begin(), basic_string(first, last))." See also http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#7. > $ cat t.cpp && nice gmake SRCS=t.cpp && ./t > #include > #include > int main () > { > std::string s ("ab"); > s.insert (s.begin () + 1, s.data (), s.data () + s.length ()); > assert ("aabb" == s); > } > aCC -c -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/../../aCC-6.0-11s/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/../rwtest -I/build/sebor/dev/stdlib/../rwtest/include -I/build/sebor/dev/stdlib/tests/include -AA -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401 +W2487 t.cpp > aCC t.o -o t -L/build/sebor/dev/stdlib/../../aCC-6.0-11s/rwtest -lrwtest -AA +nostl -Wl,+s -L/build/sebor/dev/stdlib/../../aCC-6.0-11s/lib -L/build/sebor/dev/stdlib/../../aCC-6.0-11s/lib -lstd -lm > Assertion failed: "aabb" == s, file t.cpp, line 10 > ABORT instruction (core dumped) -- 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