You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2006/03/15 20:44:50 UTC

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