|
From: <sv...@va...> - 2012-10-12 21:47:04
|
philippe 2012-10-12 22:46:55 +0100 (Fri, 12 Oct 2012)
New Revision: 13037
Log:
Some wrong options silently ignored if starting with same letters as valid option
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
Modified files:
trunk/NEWS
trunk/coregrind/m_main.c
trunk/none/tests/cmdline2.stdout.exp
Modified: trunk/coregrind/m_main.c (+7 -7)
===================================================================
--- trunk/coregrind/m_main.c 2012-10-11 17:57:27 +01:00 (rev 13036)
+++ trunk/coregrind/m_main.c 2012-10-12 22:46:55 +01:00 (rev 13037)
@@ -221,7 +221,7 @@
" --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 @@
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") {
Modified: trunk/none/tests/cmdline2.stdout.exp (+1 -1)
===================================================================
--- trunk/none/tests/cmdline2.stdout.exp 2012-10-11 17:57:27 +01:00 (rev 13036)
+++ trunk/none/tests/cmdline2.stdout.exp 2012-10-12 22:46:55 +01:00 (rev 13037)
@@ -110,7 +110,7 @@
--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]
Modified: trunk/NEWS (+1 -0)
===================================================================
--- trunk/NEWS 2012-10-11 17:57:27 +01:00 (rev 13036)
+++ trunk/NEWS 2012-10-12 22:46:55 +01:00 (rev 13037)
@@ -33,6 +33,7 @@
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)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|