|
From: <sv...@va...> - 2006-12-26 03:13:21
|
Author: sewardj
Date: 2006-12-26 03:13:14 +0000 (Tue, 26 Dec 2006)
New Revision: 6427
Log:
Merge r6374 (make User errors suppressible)
Modified:
branches/VALGRIND_3_2_BRANCH/memcheck/mc_main.c
Modified: branches/VALGRIND_3_2_BRANCH/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_2_BRANCH/memcheck/mc_main.c 2006-12-26 03:10:51 U=
TC (rev 6426)
+++ branches/VALGRIND_3_2_BRANCH/memcheck/mc_main.c 2006-12-26 03:13:14 U=
TC (rev 6427)
@@ -2268,6 +2268,7 @@
typedef=20
enum {=20
ParamSupp, // Bad syscall params
+ UserSupp, // Errors arising from client-request checks
CoreMemSupp, // Memory errors in core (pthread ops, signal handl=
ing)
=20
// Use of invalid values of given size (MemCheck only)
@@ -2945,6 +2946,7 @@
SuppKind skind;
=20
if (VG_STREQ(name, "Param")) skind =3D ParamSupp;
+ else if (VG_STREQ(name, "User")) skind =3D UserSupp;
else if (VG_STREQ(name, "CoreMem")) skind =3D CoreMemSupp;
else if (VG_STREQ(name, "Addr1")) skind =3D Addr1Supp;
else if (VG_STREQ(name, "Addr2")) skind =3D Addr2Supp;
@@ -2994,6 +2996,9 @@
&& VG_STREQ(VG_(get_error_string)(err),=20
VG_(get_supp_string)(su)));
=20
+ case UserSupp:
+ return (ekind =3D=3D UserErr);
+
case CoreMemSupp:
return (ekind =3D=3D CoreMemErr
&& VG_STREQ(VG_(get_error_string)(err),
@@ -3042,7 +3047,7 @@
Char* s;
switch (VG_(get_error_kind)(err)) {
case ParamErr: return "Param";
- case UserErr: return NULL; /* Can't suppress User errors =
*/
+ case UserErr: return "User";
case FreeMismatchErr: return "Free";
case IllegalMempoolErr: return "Mempool";
case FreeErr: return "Free";
|