diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-11-28 00:15:35 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-11-28 00:15:35 +0000 |
commit | 6362bb59c335b9722628497645459eb248379ec6 (patch) | |
tree | 6391e6f33e86b08e23f2985e6816bfdf59f0a144 /memcheck/mc_main.c | |
parent | 7358d5279a943b065f90ad02b56e39402128338b (diff) |
Make it possible to suppress, and auto-generate suppressions for,
"User" errors; that is, errors resulting from client requests (check
memory range is addressible / defined).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6374 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'memcheck/mc_main.c')
-rw-r--r-- | memcheck/mc_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index fb6706cb..f9ccd032 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -2648,6 +2648,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) @@ -3357,6 +3358,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; @@ -3406,6 +3408,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), @@ -3454,7 +3459,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"; |