[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: valgrind/coregrind
From: Jeremy Fitzhardinge <jeremy () goop ! org>
Date: 2005-03-07 22:06:47
Message-ID: 20050307220647.32ACE103CB () office ! kde ! org
[Download RAW message or body]
CVS commit by fitzhardinge:
BUGFIX: process_cmd_line_options mangles options with the syntax
--TOOLNAME:option=foo. If you use --trace-children=yes, the child
Valgrinds are passed the mangled options and fail as a result.
This patch makes sure that process_cmd_line_options makes a copy of
the option before mangling it.
M +8 -5 vg_main.c 1.263
--- valgrind/coregrind/vg_main.c #1.262:1.263
@@ -1626,5 +1626,5 @@ static void process_cmd_line_options( UI
if (0)
VG_(printf)("tool-specific arg: %s\n", arg);
- arg += toolname_len + 1;
+ arg = strdup(arg + toolname_len + 1);
arg[0] = '-';
arg[1] = '-';
@@ -1638,12 +1638,12 @@ static void process_cmd_line_options( UI
/* Ignore these options - they've already been handled */
if (VG_CLO_STREQN(7, arg, "--tool="))
- continue;
+ goto skip_arg;
if (VG_CLO_STREQN(7, arg, "--exec="))
- continue;
+ goto skip_arg;
if (VG_CLO_STREQN(20, arg, "--command-line-only="))
- continue;
+ goto skip_arg;
if ( VG_CLO_STREQ(arg, "--"))
- continue;
+ goto skip_arg;
else if (VG_CLO_STREQ(arg, "-v") ||
@@ -1756,4 +1756,7 @@ static void process_cmd_line_options( UI
VG_(bad_option)(arg);
}
+ skip_arg:
+ if (arg != vg_argv[i])
+ free(arg);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic