|
From: <sv...@va...> - 2016-09-07 20:12:39
|
Author: philippe
Date: Wed Sep 7 21:12:30 2016
New Revision: 15945
Log:
Fix 199468 - Suppressions: stack size limited to 25 while --num-callers allows more frames
Nr of callers in a suppression entry had a smaller limit than the max
for --num-callers.
This means it was not possible to precisely suppress an error with a big
stack trace.
Also, --gen-suppressions was not providing the full stack trace of
the error in the generated suppressions.
Now, a suppression entry can have the same nr of callers as a backtrace.
Generated suppressions are generated with up to --num-callers callers.
This change has neglectible impact :
* memory: stack array of 500*2 words is declared, instead of 24*2 words
This array is declared on the interim stack (startup stack), which is
largely big enough.
* cpu : neglectible more cpu needed to read suppression entries
(to initialise the bigger stack array when reading a supp entry),
Apart of the above, no impact on performance (unless of course bigger
supp entries are really used).
Note that this does not impact the behaviour for existing suppression files.
Modified:
trunk/NEWS
trunk/coregrind/m_errormgr.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Sep 7 21:12:30 2016
@@ -26,6 +26,11 @@
"nouserintercepts" can be any non-existing library name).
This new functionality is not implemented for darwin/macosx.
+* The maximum number of callers in a suppression entry is now equal to
+ the maximum size for --num-callers (500).
+ Note that --gen-suppressions=yes|all similarly generate suppression
+ containing up to --num-callers frames.
+
* New and modified GDB server monitor features:
- Valgrind's gdbserver now accepts the command 'catch syscall'.
@@ -58,6 +63,7 @@
where XXXXXX is the bug number as listed below.
191069 Exiting due to signal not reported in XML output
+199468 Suppressions: stack size limited to 25 while --num-callers allows more frames
212352 vex amd64 unhandled opc_aux = 0x 2, first_opcode == 0xDC (FCOM)
278744 cvtps2pd with redundant RexW
303877 valgrind doesn't support compressed debuginfo sections.
Modified: trunk/coregrind/m_errormgr.c
==============================================================================
--- trunk/coregrind/m_errormgr.c (original)
+++ trunk/coregrind/m_errormgr.c Wed Sep 7 21:12:30 2016
@@ -195,8 +195,8 @@
}
CoreSuppKind;
-/* Max number of callers for context in a suppression. */
-#define VG_MAX_SUPP_CALLERS 24
+/* Max number of callers for context in a suppression is
+ VG_DEEPEST_BACKTRACE. */
/* For each caller specified for a suppression, record the nature of
the caller name. Not of interest to tools. */
@@ -410,8 +410,7 @@
// Print stack trace elements
UInt n_ips = VG_(get_ExeContext_n_ips)(ec);
vg_assert(n_ips > 0);
- if (n_ips > VG_MAX_SUPP_CALLERS)
- n_ips = VG_MAX_SUPP_CALLERS;
+ vg_assert(n_ips <= VG_DEEPEST_BACKTRACE);
VG_(apply_StackTrace)(printSuppForIp_nonXML,
text,
VG_(get_ExeContext_StackTrace)(ec),
@@ -1260,7 +1259,7 @@
HChar* tool_names;
HChar* supp_name;
const HChar* err_str = NULL;
- SuppLoc tmp_callers[VG_MAX_SUPP_CALLERS];
+ SuppLoc tmp_callers[VG_DEEPEST_BACKTRACE];
// Check it's not a directory.
if (VG_(is_dir)( filename )) {
@@ -1289,7 +1288,7 @@
supp->count = 0;
// Initialise temporary reading-in buffer.
- for (i = 0; i < VG_MAX_SUPP_CALLERS; i++) {
+ for (i = 0; i < VG_DEEPEST_BACKTRACE; i++) {
tmp_callers[i].ty = NoName;
tmp_callers[i].name_is_simple_str = False;
tmp_callers[i].name = NULL;
@@ -1391,7 +1390,7 @@
BOMB("missing stack trace");
}
}
- if (i == VG_MAX_SUPP_CALLERS)
+ if (i == VG_DEEPEST_BACKTRACE)
BOMB("too many callers in stack trace");
if (i > 0 && i >= VG_(clo_backtrace_size))
break;
|