From 05b002dea0f33a830cee26e13bed39592433c011 Mon Sep 17 00:00:00 2001 From: Vishwath Mohan Date: Wed, 30 May 2018 18:39:07 -0700 Subject: [PATCH] Don't enable diagnostics for CFI when setting the CFI sanitizer. The SetSanitizer() method in cc/sanitize.go was also enabling diagnostics for CFI when invoked from the sanitizer mutator. We shouldn't be doing this, so this CL disables that. Bug: 79785496 Test: strings libziparchive.so | grep 'ubsan' Change-Id: Iffe0d4e9c333ac5dfbec3f48e381c232ce5d4463 --- cc/sanitize.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cc/sanitize.go b/cc/sanitize.go index a704cf1e5..e59edf58a 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -560,7 +560,6 @@ func (sanitize *sanitize) SetSanitizer(t sanitizerType, b bool) { sanitize.Properties.Sanitize.Integer_overflow = boolPtr(b) case cfi: sanitize.Properties.Sanitize.Cfi = boolPtr(b) - sanitize.Properties.Sanitize.Diag.Cfi = boolPtr(b) default: panic(fmt.Errorf("unknown sanitizerType %d", t)) }