incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Pevtsov <ant...@moscow.vdiweb.com>
Subject Re: Re: svn commit: r386035 - /incubator/stdcxx/trunk/tests/strings/21.string.erase.cpp
Date Fri, 17 Mar 2006 16:32:15 GMT
OK, now it is clear, thanks.
The patch is attached.

Here is the ChangeLog:

2006-03-17  Anton Pevtsov  <antonp@moscow.vdiweb.com>

    * 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


Mime
View raw message