Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 48451 invoked from network); 17 Mar 2006 17:15:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Mar 2006 17:15:32 -0000 Received: (qmail 75456 invoked by uid 500); 17 Mar 2006 17:15:32 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 75441 invoked by uid 500); 17 Mar 2006 17:15:31 -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 75430 invoked by uid 99); 17 Mar 2006 17:15:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 09:15:31 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 09:15:30 -0800 Received: from bco-exchange.bco.roguewave.com (bco-exchange.bco.roguewave.com [172.19.31.48]) by moroha.quovadx.com (8.13.4/8.13.4) with ESMTP id k2HHDLMg014489 for ; Fri, 17 Mar 2006 17:13:21 GMT Received: from [10.70.3.113] (10.70.3.113 [10.70.3.113]) by bco-exchange.bco.roguewave.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id F5YGRZLN; Fri, 17 Mar 2006 10:13:46 -0700 Message-ID: <441AEFB2.8050704@roguewave.com> Date: Fri, 17 Mar 2006 10:19:46 -0700 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r386035 - /incubator/stdcxx/trunk/tests/strings/21.string.erase.cpp References: <441AE48F.3040106@moscow.vdiweb.com> In-Reply-To: <441AE48F.3040106@moscow.vdiweb.com> Content-Type: text/plain; charset=us-ascii; format=flowed 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 Anton Pevtsov wrote: > OK, now it is clear, thanks. > The patch is attached. Please go ahead and commit this. Also, please feel free to commit trivial changes like this one without review. Martin > > Here is the ChangeLog: > > 2006-03-17 Anton Pevtsov > > * 21.string.erase.cpp (main): Fixed bug with missed '#' sign. > > > Thanks, > Anton Pevtsov > > -----Original Message----- > From: Martin Sebor [mailto:sebor@roguewave.com] > Sent: Thursday, March 16, 2006 20:55 > To: stdcxx-dev@incubator.apache.org > Subject: Re: svn commit: r386035 - > /incubator/stdcxx/trunk/tests/strings/21.string.erase.cpp > > > Anton Pevtsov wrote: > > >> Is the adding of this missing '#' fix the problem? I.e. will this line > > > >> ... > >> "|-no-erase-range#", > >> ... > >> be correct? > > > Yes. > > Without the '#' the option is expected to be handled by a callback > function (called by the option processor when the option is seen on the > command line). With '#', the option "handler" is expected to be a > pointer to an int (let's call it popt) and each time the option is seen > on the command line the option processor increments *popt by 1 (or sets > it to the value of a numeric argument if one is provided, e.g., > --no-erase-range=5). > > > >> It works for our case but... I have vague idea that we have had > >> another problem with this place in tests and there was some another > >> problem when the pound sign have been set... But I am not sure - I > >> need to look for this in the mail archive. > > > All the other options here use the '#', why should this one be any > different? (Because it's last? No, that wouldn't be correct.) > > Martin > > > >> > >> > >> Thanks, > >> Anton Pevtsov > >> > >> > >> -----Original Message----- > >> From: Martin Sebor [mailto:sebor@roguewave.com] > >> Sent: Wednesday, March 15, 2006 22:45 > >> To: stdcxx-dev@incubator.apache.org > >> Subject: Re: svn commit: r386035 - > >> /incubator/stdcxx/trunk/tests/strings/21.string.erase.cpp > >> > >> > >> antonp@apache.org wrote: > >> > > > >>>>Author: antonp > >>>>Date: Wed Mar 15 02:18:36 2006 > >>>>New Revision: 386035 > > > >> > >> [...] > >> > > > >>>>@@ -512,9 +547,21 @@ > >>>> 0 /* no comment */, > >>>> run_test, > >>>> "|-no-char_traits# " > >>>>- "|-no-user_traits# ", > >>>>- "|-no-user_chars", > >>>>+ "|-no-user_traits# " > >>>>+ "|-no-user_chars# " > >>>>+ "|-no-exceptions# " > >>>>+ "|-no-erase# " > >>>>+ "|-no-erase-pos# " > >>>>+ "|-no-erase-count# " > >>>>+ "|-no-erase-iterator# " > >>>>+ "|-no-erase-range", > > > >> > >> > >> This is missing the trailing pound sign so the option processor will > >> assume the address is that of a callback function and try to call it > >> when it sees the option on the command line. > >> > >> Here's what I get on Solaris/SPARC, for example: > >> $ ./21_erase --no-erase-range > >> Illegal Instruction (core dumped) > >> > >> We should extend __rw_memattr() to check function pointers to make > >> sure they point to memory with executable permissions and detect and > >> diagnose these kinds of mismatches. > >> > >> Martin > > > > ------------------------------------------------------------------------ > > Index: 21.string.erase.cpp > =================================================================== > --- 21.string.erase.cpp (revision 386632) > +++ 21.string.erase.cpp (working copy) > @@ -1,6 +1,6 @@ > /*************************************************************************** > * > - * erase.cpp - string test exercising [lib.string::erase] > + * 21.string.erase.cpp - string test exercising [lib.string::erase] > * > * $Id$ > * > @@ -554,7 +554,7 @@ > "|-no-erase-pos# " > "|-no-erase-count# " > "|-no-erase-iterator# " > - "|-no-erase-range", > + "|-no-erase-range#", > &rw_opt_no_char_traits, > &rw_opt_no_user_traits, > &rw_opt_no_user_chars,