Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 6360 invoked from network); 6 Oct 2006 12:39:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Oct 2006 12:39:38 -0000 Received: (qmail 3038 invoked by uid 500); 6 Oct 2006 12:39:38 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 2980 invoked by uid 500); 6 Oct 2006 12:39:37 -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 2969 invoked by uid 99); 6 Oct 2006 12:39:37 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Oct 2006 05:39:37 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [209.237.227.198] ([209.237.227.198:54202] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id B5/F8-18133-58E46254 for ; Fri, 06 Oct 2006 05:39:34 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 74FE271408C for ; Fri, 6 Oct 2006 05:39:19 -0700 (PDT) Message-ID: <23000834.1160138359476.JavaMail.root@brutus> Date: Fri, 6 Oct 2006 05:39:19 -0700 (PDT) From: "Farid Zaripov (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Created: (STDCXX-297) std::bitset constructor addressed memory beyond the object MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N std::bitset constructor addressed memory beyond the object ---------------------------------------------------------- Key: STDCXX-297 URL: http://issues.apache.org/jira/browse/STDCXX-297 Project: C++ Standard Library Issue Type: Bug Components: 23. Containers Affects Versions: 4.1.3 Environment: All Reporter: Farid Zaripov Priority: Trivial Fix For: 4.2 he program below fails: ------------------------------------------ #include #include #include #include #include #include int main () { typedef std::bitset<128> BitSet; const std::size_t size = sizeof (BitSet); char buf [size + 4]; memset (buf, '\xff', sizeof (buf)); BitSet* btest = new (buf) BitSet (std::basic_string ()); for (std::size_t i = size; i < sizeof (buf); ++i) assert ('\xff' == buf [i]); btest->~BitSet (); return 0; } ------------------------------------------ Assertion failed: '\xff' == buf [i], file test.cpp, line 19 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. - 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