@@ -26,9 +26,10 @@ static const char kInterceptorName[] = "interceptor_name";
26
26
static const char kInterceptorViaFunction [] = " interceptor_via_fun" ;
27
27
static const char kInterceptorViaLibrary [] = " interceptor_via_lib" ;
28
28
static const char kODRViolation [] = " odr_violation" ;
29
+ static const char kAllocDeallocMismatch [] = " alloc_dealloc_mismatch" ;
29
30
static const char *kSuppressionTypes [] = {
30
31
kInterceptorName , kInterceptorViaFunction , kInterceptorViaLibrary ,
31
- kODRViolation };
32
+ kODRViolation , kAllocDeallocMismatch };
32
33
33
34
SANITIZER_INTERFACE_WEAK_DEF (const char *, __asan_default_suppressions, void ) {
34
35
return " " ;
@@ -52,7 +53,8 @@ bool IsInterceptorSuppressed(const char *interceptor_name) {
52
53
bool HaveStackTraceBasedSuppressions () {
53
54
CHECK (suppression_ctx);
54
55
return suppression_ctx->HasSuppressionType (kInterceptorViaFunction ) ||
55
- suppression_ctx->HasSuppressionType (kInterceptorViaLibrary );
56
+ suppression_ctx->HasSuppressionType (kInterceptorViaLibrary ) ||
57
+ suppression_ctx->HasSuppressionType (kAllocDeallocMismatch );
56
58
}
57
59
58
60
bool IsODRViolationSuppressed (const char *global_var_name) {
@@ -79,7 +81,12 @@ bool IsStackTraceSuppressed(const StackTrace *stack) {
79
81
return true ;
80
82
}
81
83
82
- if (suppression_ctx->HasSuppressionType (kInterceptorViaFunction )) {
84
+ const char *suppressions[] = {kInterceptorViaFunction ,
85
+ kAllocDeallocMismatch };
86
+ for (const char *suppression : suppressions) {
87
+ if (!suppression_ctx->HasSuppressionType (suppression)) {
88
+ continue ;
89
+ }
83
90
SymbolizedStackHolder symbolized_stack (symbolizer->SymbolizePC (addr));
84
91
const SymbolizedStack *frames = symbolized_stack.get ();
85
92
CHECK (frames);
@@ -88,9 +95,8 @@ bool IsStackTraceSuppressed(const StackTrace *stack) {
88
95
if (!function_name) {
89
96
continue ;
90
97
}
91
- // Match "interceptor_via_fun" suppressions.
92
- if (suppression_ctx->Match (function_name, kInterceptorViaFunction ,
93
- &s)) {
98
+ // Match suppressions.
99
+ if (suppression_ctx->Match (function_name, suppression, &s)) {
94
100
return true ;
95
101
}
96
102
}
0 commit comments