Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 34688 invoked from network); 4 Sep 2007 22:41:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2007 22:41:05 -0000 Received: (qmail 42004 invoked by uid 500); 4 Sep 2007 22:41:00 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 41992 invoked by uid 500); 4 Sep 2007 22:41:00 -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 41981 invoked by uid 99); 4 Sep 2007 22:41:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 15:41:00 -0700 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; Tue, 04 Sep 2007 22:41:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E71D0714187 for ; Tue, 4 Sep 2007 15:40:44 -0700 (PDT) Message-ID: <24052857.1188945644943.JavaMail.jira@brutus> Date: Tue, 4 Sep 2007 15:40:44 -0700 (PDT) From: "Travis Vitek (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Updated: (STDCXX-542) message catalog assert/crash after opening multiple In-Reply-To: <28220468.1188595158710.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-542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Travis Vitek updated STDCXX-542: -------------------------------- Fix Version/s: 4.2.1 Affects Version/s: 4.1.2 4.1.3 4.1.4 2007-09-04 Travis Vitek STDCXX-542 catalog.cpp (catclose): check bounds before index to avoid out of bound access Index: catalog.cpp =================================================================== --- catalog.cpp (revision 570205) +++ catalog.cpp (working copy) @@ -134,7 +134,7 @@ delete __rw_catlist[i]; __rw_catlist[i] = 0; CatVector::size_type j; - for (j = i+1; __rw_catlist[j] && j < __rw_catlist.size(); j++) + for (j = i+1; j < __rw_catlist.size() && __rw_catlist[j]; j++) __rw_catlist[j-1] = __rw_catlist[j]; if (j < __rw_catlist.size()) __rw_catlist[j] = 0; > message catalog assert/crash after opening multiple > --------------------------------------------------- > > Key: STDCXX-542 > URL: https://issues.apache.org/jira/browse/STDCXX-542 > Project: C++ Standard Library > Issue Type: Bug > Components: 22. Localization > Affects Versions: 4.1.2, 4.1.3, 4.1.4 > Environment: Windows > Reporter: Travis Vitek > Assignee: Travis Vitek > Fix For: 4.2.1 > > > The below code asserts/crashes reliably on windows, but runs to completion on at least one other platform. Note that I copied the rwstdmessages.dll from the examples directory to simplify the testcase. > C:\build\stdcxx\build\msvc-8.0\15d\tests>type t.cpp > #include > #include > #include > // note same problem occurs even if catalog files are > // different. > #ifdef _WIN32 > # define CATALOG0 "rwstdmessages.dll" > # define CATALOG1 "rwstdmessages.dll" > #else > # define CATALOG0 "./rwstdmessages.cat" > # define CATALOG1 "./rwstdmessages.cat" > #endif > int main (int argc, char *argv[]) > { > typedef std::messages messagesT; > const std::locale loc; > const messagesT& msgs = > std::use_facet(loc); > const messagesT::catalog cat0 = > msgs.open (CATALOG0, loc); > assert(! (cat0 < 0)); // ensure open succeeded > const messagesT::catalog cat1 = > msgs.open (CATALOG1, loc); > assert(! (cat1 < 0)); // ensure open succeeded > msgs.close (cat1); // crash/assert here > msgs.close (cat0); > return 0; > } > C:\build\stdcxx\build\msvc-8.0\15d\tests>t > C:\build\stdcxx\include\rw/_iterbase.h:436: class __rw::__rw_cat *&__thiscall __rw::__rw_debug_iter >,class __rw::__rw_cat * *,class __rw::__rw_cat * *>::operator *(void) const: Assertion '_C_is_dereferenceable ()' > failed. > 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.