Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 8057 invoked from network); 13 Feb 2006 20:17:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Feb 2006 20:17:51 -0000 Received: (qmail 11375 invoked by uid 500); 13 Feb 2006 20:17:51 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 11344 invoked by uid 500); 13 Feb 2006 20:17:51 -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 11325 invoked by uid 99); 13 Feb 2006 20:17:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2006 12:17:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.17.213.84] (HELO bco-exchange.bco.roguewave.com) (12.17.213.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2006 12:17:50 -0800 Received: from [10.70.2.6] (skynet.bco.roguewave.com [10.70.2.6]) by bco-exchange.bco.roguewave.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id ZGW28V1X; Mon, 13 Feb 2006 13:17:29 -0700 Message-ID: <43F0EA4B.3080109@roguewave.com> Date: Mon, 13 Feb 2006 13:21:31 -0700 From: Liviu Nicoara User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: 0.new.cpp References: <43CE6FAC.3000507@moscow.vdiweb.com> <43CFE7F6.4060208@roguewave.com> <43D01A83.4020206@roguewave.com> <43D5298C.2060009@roguewave.com> <43D542BD.7040305@roguewave.com> <43D544C9.7070502@roguewave.com> <43D693E6.4010405@roguewave.com> <43EA5626.3090403@roguewave.com> <43EA5718.1000504@roguewave.com> <43F0E398.6010001@roguewave.com> In-Reply-To: <43F0E398.6010001@roguewave.com> Content-Type: multipart/mixed; boundary="------------030702010201060607030602" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------030702010201060607030602 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Martin, I think there are more places sprtoing the extra newlines than the ones you have in your diff. Aren't rw_info formatting strings supposed to not have trailing newlines too? Liviu Martin Sebor wrote: > Liviu Nicoara wrote: > >>I am sorry, I spaced on it. I am going to tend to it as soon as I can. > > > Liviu, please don't forget to commit this. FWIW, the patch is very > simple (see the attachment). > > Martin > > >>Liviu >> >>Martin Sebor wrote: >> >> >>>Martin Sebor wrote: >>> >>> >>> >>>>Liviu Nicoara wrote: >>>> >>>> >>>> >>>> >>>>>I have attached my attempt at converting new.cpp "self" test to the new >>>>>driver. >>> >>>[...] >>> >>> >>> >>>>PS Also, the formatting strings passed to the rw_error() calls in >>>>new.cpp have redundant trailing newlines -- they should be removed. >>>>Could you please make the change and commit it? >>> >>> >>>Liviu, any progress on this? >>> >>>Martin >>> > > > --------------030702010201060607030602 Content-Type: text/x-patch; name="new.cpp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="new.cpp.diff" Index: tests/src/new.cpp =================================================================== --- tests/src/new.cpp (revision 377477) +++ tests/src/new.cpp (working copy) @@ -134,7 +134,7 @@ if (hdr->self_ != hdr) { rw_error (0, 0, __LINE__, "%s:%d: header guard corruption at %p: " - "expected %p, got %p\n", + "expected %p, got %p", hdr->ptr_, (const void*)hdr, hdr->self_); abort (); } @@ -143,7 +143,7 @@ if (hdr->ptr_ != hdr + 1) { rw_error (0, 0, __LINE__, "%s:%d: block address mismatch: " - "expected %p, got %p\n", + "expected %p, got %p", __FILE__, __LINE__, (const void*)(hdr + 1), hdr->ptr_); @@ -163,7 +163,7 @@ rw_error (0, 0, __LINE__, "%s:%d: trailing guard corruption at %p " - "+ %zu of a %zu byte block: '0x%02x' != '0x%x'\n", + "+ %zu of a %zu byte block: '0x%02x' != '0x%x'", __FILE__, __LINE__, hdr->ptr_, hdr->size_ + off + 1, hdr->size_, UChar (grd [off]), UChar (Guard [off])); @@ -189,7 +189,7 @@ rw_error (0, 0, __LINE__, "%s:%d: counts mismatch: found %zu " "bytes in %zu blocks, expected " - "%zu in %zu\n", __FILE__, __LINE__, + "%zu in %zu", __FILE__, __LINE__, nbytes, nblocks, sum_bytes, sum_blocks); abort (); @@ -201,7 +201,7 @@ #if !defined (__DECCXX_VER) || __DECCXX_VER >= 60600000 rw_error (0, 0, __LINE__, - "%s:%d: %s (%p): invalid pointer\n", + "%s:%d: %s (%p): invalid pointer", __FILE__, __LINE__, caller, ptr); _rw_print_heap (); @@ -215,7 +215,7 @@ if (static_dtors) { rw_error (0, 0, __LINE__, - "%s:%d: %s (%p): invalid pointer\n", + "%s:%d: %s (%p): invalid pointer", __FILE__, __LINE__, caller, ptr); print_heap (); @@ -229,7 +229,7 @@ if (!warned++) { rw_warning (0, 0, __LINE__, "%s:%d: %s (%p): warning: invalid pointer; " - "ignoring memory errors from here on out\n", + "ignoring memory errors from here on out", __FILE__, __LINE__, caller, ptr); } } @@ -247,7 +247,7 @@ _rw_print_heap () { rw_info (0, 0, __LINE__, - "%s:%d: heap dump:\n%zu bytes in %zu blocks%s\n", + "%s:%d: heap dump:\n%zu bytes in %zu blocks%s", __FILE__, __LINE__, pst->bytes_, pst->blocks_, last ? ":" : ""); for (Header *hdr = last; hdr; hdr = hdr->prev_) { @@ -256,7 +256,7 @@ const bool array = !!(seq >> (_RWSTD_CHAR_BIT * sizeof (size_t) - 1)); rw_info (0, 0, __LINE__, - "%zu: %zu bytes at %p allocated by operator new%s()\n", + "%zu: %zu bytes at %p allocated by operator new%s()", hdr->id_, hdr->size_, hdr->ptr_, array ? "[]" : ""); } @@ -478,7 +478,7 @@ if (trace_sequence [0] <= seq_gen && seq_gen < trace_sequence [1]) rw_error (0, 0, __LINE__, - "%s:%d: %3zi. %s (%zu) --> %p\n", + "%s:%d: %3zi. %s (%zu) --> %p", __FILE__, __LINE__, seq_gen, name [array], nbytes, hdr->ptr_); @@ -538,7 +538,7 @@ } if (trace_sequence [0] <= seq && seq < trace_sequence [1]) { - rw_error (0, 0, __LINE__, "%s:%d: %3zi. %s (%p); size = %zu%s\n", + rw_error (0, 0, __LINE__, "%s:%d: %3zi. %s (%p); size = %zu%s", __FILE__, __LINE__, seq, name [array], ptr, nbytes, mismatch ? ": array form mismatch" : ""); } @@ -553,7 +553,7 @@ "%s:%d: deallocation mismatch: " "pointer allocated %zu%s in the program " "with a call to operator new%s(%zu) " - "being deallocated with the wrong form of %s(%p)\n", + "being deallocated with the wrong form of %s(%p)", __FILE__, __LINE__, seq + 1, ord_sfx, array ? "" : "[]", nbytes, name [array], ptr); @@ -587,7 +587,7 @@ ++pst->delete_0_calls_ [array]; if (trace_sequence [0] <= seq_gen && seq_gen < trace_sequence [1]) - rw_error (0, 0, __LINE__, "%s:%d: %s (0)\n", + rw_error (0, 0, __LINE__, "%s:%d: %s (0)", __FILE__, __LINE__, name [array]); } } --------------030702010201060607030602--