]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge r6374 (make User errors suppressible)
authorJulian Seward <jseward@acm.org>
Tue, 26 Dec 2006 03:13:14 +0000 (03:13 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 26 Dec 2006 03:13:14 +0000 (03:13 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6427

memcheck/mc_main.c

index 0e3096f98cb4c425fe86044736b3f2dcd73c5187..5fcc19a774e2b07f72b557f355a4cc94829a49fb 100644 (file)
@@ -2268,6 +2268,7 @@ typedef
 typedef 
    enum { 
       ParamSupp,     // Bad syscall params
+      UserSupp,      // Errors arising from client-request checks
       CoreMemSupp,   // Memory errors in core (pthread ops, signal handling)
 
       // Use of invalid values of given size (MemCheck only)
@@ -2945,6 +2946,7 @@ static Bool mc_recognised_suppression ( Char* name, Supp* su )
    SuppKind skind;
 
    if      (VG_STREQ(name, "Param"))   skind = ParamSupp;
+   else if (VG_STREQ(name, "User"))    skind = UserSupp;
    else if (VG_STREQ(name, "CoreMem")) skind = CoreMemSupp;
    else if (VG_STREQ(name, "Addr1"))   skind = Addr1Supp;
    else if (VG_STREQ(name, "Addr2"))   skind = Addr2Supp;
@@ -2994,6 +2996,9 @@ static Bool mc_error_matches_suppression(Error* err, Supp* su)
               && VG_STREQ(VG_(get_error_string)(err), 
                           VG_(get_supp_string)(su)));
 
+      case UserSupp:
+         return (ekind == UserErr);
+
       case CoreMemSupp:
          return (ekind == CoreMemErr
               && VG_STREQ(VG_(get_error_string)(err),
@@ -3042,7 +3047,7 @@ static Char* mc_get_error_name ( Error* err )
    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";