Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 87257 invoked from network); 14 Apr 2008 20:16:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Apr 2008 20:16:21 -0000 Received: (qmail 81893 invoked by uid 500); 14 Apr 2008 20:16:19 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 81866 invoked by uid 500); 14 Apr 2008 20:16:19 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 81817 invoked by uid 99); 14 Apr 2008 20:16:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 13:16:19 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Apr 2008 20:15:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 50DC7234C0E2 for ; Mon, 14 Apr 2008 13:13:09 -0700 (PDT) Message-ID: <1768124004.1208203989329.JavaMail.jira@brutus> Date: Mon, 14 Apr 2008 13:13:09 -0700 (PDT) From: "Travis Vitek (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Reopened: (STDCXX-857) unexpected assertion from _rw_bufcat In-Reply-To: <1544142384.1207963744811.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-857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Travis Vitek reopened STDCXX-857: --------------------------------- Reopening due to potential memory leaks introduced indirectly by this change. Code in fmt_bits.cpp assumes that the buffer passed in to rw_asnprintf() will be deallocated as necessary. This was true previously, but that behavior changed with the previously committed fix. These functions need to be updated to deallocate existing buffers if the call to rw_asnprintf() allocates new ones. > unexpected assertion from _rw_bufcat > ------------------------------------ > > Key: STDCXX-857 > URL: https://issues.apache.org/jira/browse/STDCXX-857 > Project: C++ Standard Library > Issue Type: Bug > Components: Test Driver > Affects Versions: 4.2.1 > Reporter: Travis Vitek > Assignee: Travis Vitek > Fix For: 4.2.1 > > Attachments: stdcxx-857.patch > > Original Estimate: 2h > Time Spent: 3.5h > Remaining Estimate: 0h > > Here is the assertion... > {noformat} > ..\..\..\tests\src\printf.cpp:486: char *__cdecl _rw_bufcat(struct Buffer &,const char *,unsigned int): Assertion '0 == memcmp (*buf.pbuf + *buf.pbufsize, guard, guardsize)' failed. > {noformat} > Here is a testcase... > {noformat} > #include > #include > #include > int main (int argc, char* argv[]) > { > const char* s = 1 < argc ? argv [1] : "bug-zapper"; > char buffer [4]; > char *buf = buffer; > size_t bufsize = sizeof buffer; > rw_asnprintf (&buf, &bufsize, "%s", s); > if (buf != buffer) > free (buf); > return 0; > } > {noformat} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.