Some wrong options silently ignored if starting with same letters as valid option
authorphilippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Fri, 12 Oct 2012 21:46:55 +0000 (21:46 +0000)
committerphilippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Fri, 12 Oct 2012 21:46:55 +0000 (21:46 +0000)
For example, options below are silently "accepted"+ignored:
  valgrind --profile-heaps=yes --max-stackframes=35 memcheck/tests/trivialleak
  valgrind --profile-heaps=oui --max-stackframes=3.141592654 memcheck/tests/trivialleak

Also fixed the on-line --help output for option --core-redzone-size

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13037 a5019735-40e9-0310-863c-91ae7b9d1cf9

NEWS
coregrind/m_main.c
none/tests/cmdline2.stdout.exp

diff --git a/NEWS b/NEWS
index 2f8760bfed4b2d31b971e5b9710a78d27f99b8df..81d00314b1f5061298c20165860dc877dfa7953b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ m = merged into 3_8_BRANCH
 306054    [390] s390x: Condition code computation for convert-to-int/logical
 307155    [390] filter_gdb should filter out syscall-template.S T_PSEUDO
 n-i-bz    [390] report error for vgdb snapshot requested before execution
+n-i-bz    [390] Some wrong command line options could be ignored
 
 Release 3.8.1 (19 September 2012)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
index 930ba9c4194083fa3c6acb8e55a4c2b04b402d1a..5d3e7751f3a99743206b0e00f3d23e0463516ade 100644 (file)
@@ -221,7 +221,7 @@ static void usage_NORETURN ( Bool debug_help )
 "    --trace-redir=no|yes      show redirection details? [no]\n"
 "    --trace-sched=no|yes      show thread scheduler details? [no]\n"
 "    --profile-heap=no|yes     profile Valgrind's own space use\n"
-"    --core-redzone=<number>   set minimum size of redzones added before/after\n"
+"    --core-redzone-size=<number>  set minimum size of redzones added before/after\n"
 "                              heap blocks allocated for Valgrind internal use (in bytes) [4]\n"
 "    --wait-for-gdb=yes|no     pause on startup to wait for gdb attach\n"
 "    --sym-offsets=yes|no      show syms in form 'name+offset' ? [no]\n"
@@ -486,12 +486,12 @@ void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
       else if VG_STREQN(20, arg, "--command-line-only=") {}
       else if VG_STREQ(     arg, "--")                   {}
       else if VG_STREQ(     arg, "-d")                   {}
-      else if VG_STREQN(16, arg, "--max-stackframe")     {}
-      else if VG_STREQN(16, arg, "--main-stacksize")     {}
-      else if VG_STREQN(11, arg,  "--sim-hints")         {}
-      else if VG_STREQN(14, arg, "--profile-heap")       {}
-      else if VG_STREQN(14, arg, "--core-redzone-size")  {}
-      else if VG_STREQN(14, arg, "--redzone-size")       {}
+      else if VG_STREQN(17, arg, "--max-stackframe=")    {}
+      else if VG_STREQN(17, arg, "--main-stacksize=")    {}
+      else if VG_STREQN(12, arg,  "--sim-hints=")        {}
+      else if VG_STREQN(15, arg, "--profile-heap=")      {}
+      else if VG_STREQN(20, arg, "--core-redzone-size=") {}
+      else if VG_STREQN(15, arg, "--redzone-size=")      {}
 
       /* Obsolete options. Report an error and exit */
       else if VG_STREQN(34, arg, "--vex-iropt-precise-memory-exns=no") {
index 3b89c6b3849f7ea4ccf5b1e1bf9dc969a4e315d5..b513b7a552f9717bd579106cb931c268c455cb8d 100644 (file)
@@ -110,7 +110,7 @@ usage: valgrind [options] prog-and-args
     --trace-redir=no|yes      show redirection details? [no]
     --trace-sched=no|yes      show thread scheduler details? [no]
     --profile-heap=no|yes     profile Valgrind's own space use
-    --core-redzone=<number>   set minimum size of redzones added before/after
+    --core-redzone-size=<number>  set minimum size of redzones added before/after
                               heap blocks allocated for Valgrind internal use (in bytes) [4]
     --wait-for-gdb=yes|no     pause on startup to wait for gdb attach
     --sym-offsets=yes|no      show syms in form 'name+offset' ? [no]