|
From: <sv...@va...> - 2009-02-16 22:14:35
|
Author: njn
Date: 2009-02-16 22:06:20 +0000 (Mon, 16 Feb 2009)
New Revision: 9184
Log:
Don't print the stack trace when invalid file descriptors are detected.
This makes two more tests pass on Linux.
Modified:
branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
branches/DARWIN/memcheck/mc_malloc_wrappers.c
Modified: branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c
===================================================================
--- branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-16 21:44:42 UTC (rev 9183)
+++ branches/DARWIN/coregrind/m_syswrap/syswrap-generic.c 2009-02-16 22:06:20 UTC (rev 9184)
@@ -1185,12 +1185,17 @@
VG_(message)(Vg_UserMsg,
"Warning: invalid file descriptor %d in syscall %s()",
fd, syscallname);
- OINK(VG_(clo_log_fd));
- if (fd == VG_(clo_log_fd))
+ if (fd == VG_(clo_log_fd)) {
VG_(message)(Vg_UserMsg,
" Use --log-fd=<number> to select an alternative log fd.");
+ }
+ // DDD: consider always printing this stack trace, it's useful.
+ // Also consider also making this a proper core error, ie.
+ // suppressible and all that.
+ if (VG_(clo_verbosity) > 1) {
VG_(get_and_pp_StackTrace)(tid, VG_(clo_backtrace_size));
}
+ }
return allowed;
}
Modified: branches/DARWIN/memcheck/mc_malloc_wrappers.c
===================================================================
--- branches/DARWIN/memcheck/mc_malloc_wrappers.c 2009-02-16 21:44:42 UTC (rev 9183)
+++ branches/DARWIN/memcheck/mc_malloc_wrappers.c 2009-02-16 22:06:20 UTC (rev 9184)
@@ -155,6 +155,7 @@
/*--- client_malloc(), etc ---*/
/*------------------------------------------------------------*/
+// DDD: should make this a proper error (bug #79311).
static Bool complain_about_silly_args(SizeT sizeB, Char* fn)
{
// Cast to a signed type to catch any unexpectedly negative args. We're
|