334049 lzcnt fails silently (x86_32)
334705 sendmsg and recvmsg should guard against bogus msghdr fields.
334727 Build fails with -Werror=format-security
-334802 valgrind does not always explain why a given option is bad
n-i-bz Fix KVM_CREATE_IRQCHIP ioctl handling
n-i-bz s390x: Fix memory corruption for multithreaded applications
n-i-bz vex arm->IR: allow PC as basereg in some LDRD cases
return;
bad:
- VG_(fmsg_bad_option)(opt, "Bad argument '%s'\n", optval);
+ VG_(fmsg_bad_option)(opt, "");
overflow:
VG_(fmsg_bad_option)(opt,
else if VG_INT_CLO (arg, "--vgdb-poll", VG_(clo_vgdb_poll)) {}
else if VG_INT_CLO (arg, "--vgdb-error", VG_(clo_vgdb_error)) {}
else if VG_STR_CLO (arg, "--vgdb-stop-at", tmp_str) {
- const HChar event_set[] = "startup,exit,valgrindabexit";
- if (!VG_(parse_enum_set)(event_set, tmp_str,
+ if (!VG_(parse_enum_set)("startup,exit,valgrindabexit", tmp_str,
&VG_(clo_vgdb_stop_at)))
- VG_(fmsg_bad_option)(arg,
- "Bad event set '%s', should be a list containing '%s'\n",
- tmp_str, event_set);
+ VG_(fmsg_bad_option)(arg, "");
}
else if VG_STR_CLO (arg, "--vgdb-prefix", VG_(clo_vgdb_prefix)) {
VG_(arg_vgdb_prefix) = arg;
else if (VG_(strcmp)(tmp_str, "no") == 0)
VG_(clo_fair_sched) = disable_fair_sched;
else
- VG_(fmsg_bad_option)(arg,
- "Bad argument, should be 'yes', 'try' or 'no'\n");
+ VG_(fmsg_bad_option)(arg, "");
+
}
else if VG_BOOL_CLO(arg, "--trace-sched", VG_(clo_trace_sched)) {}
else if VG_BOOL_CLO(arg, "--trace-signals", VG_(clo_trace_signals)) {}
chaos. No big deal; dump_error is a flag for debugging V
itself. */
if (VG_(clo_dump_error) > 0) {
- VG_(fmsg_bad_option)("--xml=yes",
- "Cannot be used together with --dump-error");
+ VG_(fmsg_bad_option)("--xml=yes together with --dump-error", "");
}
/* Disable error limits (this might be a bad idea!) */
return out;
bad: {
- VG_(fmsg_bad_option)(option_name, "Bad format '%s'\n", format);
+ HChar* opt = // 2: 1 for the '=', 1 for the NUL.
+ VG_(malloc)( "options.efn.3",
+ VG_(strlen)(option_name) + VG_(strlen)(format) + 2 );
+ VG_(strcpy)(opt, option_name);
+ VG_(strcat)(opt, "=");
+ VG_(strcat)(opt, format);
+ VG_(fmsg_bad_option)(opt, "");
}
}
Long n = VG_(strtoll10)( val, &s ); \
(qq_var) = n; \
/* Check for non-numeralness, or overflow. */ \
- if ('\0' != s[0] || (qq_var) != n) VG_(fmsg_bad_option)(qq_arg, \
- "Invalid integer value '%s'\n", val); \
+ if ('\0' != s[0] || (qq_var) != n) VG_(fmsg_bad_option)(qq_arg, ""); \
True; \
}) \
)
/* for all the other macros in this file. */ \
/* Check for non-numeralness, or overflow. */ \
/* Nb: it will overflow if qq_var is unsigned and qq_val is negative! */ \
- if ('\0' != s[0] || (qq_var) != n) VG_(fmsg_bad_option)(qq_arg, \
- "Invalid integer value '%s'\n", val); \
+ if ('\0' != s[0] || (qq_var) != n) VG_(fmsg_bad_option)(qq_arg, ""); \
/* Check bounds. */ \
if ((qq_var) < (qq_lo) || (qq_var) > (qq_hi)) { \
VG_(fmsg_bad_option)(qq_arg, \
double n = VG_(strtod)( val, &s ); \
(qq_var) = n; \
/* Check for non-numeralness */ \
- if ('\0' != s[0]) VG_(fmsg_bad_option)(qq_arg, \
- "Invalid double (decimal) value '%s'\n"); \
+ if ('\0' != s[0]) VG_(fmsg_bad_option)(qq_arg, ""); \
True; \
}) \
)
// Check options.
if (clo_pages_as_heap) {
if (clo_stacks) {
- VG_(fmsg_bad_option)("--pages-as-heap=yes",
- "Cannot be used together with --stacks=yes");
+ VG_(fmsg_bad_option)(
+ "--pages-as-heap=yes together with --stacks=yes", "");
}
}
if (!clo_heap) {