Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753587AbbLaPTw (ORCPT ); Thu, 31 Dec 2015 10:19:52 -0500 Received: from mx2.parallels.com ([199.115.105.18]:39495 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbbLaPTu (ORCPT ); Thu, 31 Dec 2015 10:19:50 -0500 From: Andrey Ryabinin To: CC: , Andrey Ryabinin Subject: [PATCH] ubsan-run-time-undefined-behavior-sanity-checker-fix-5 Date: Thu, 31 Dec 2015 18:20:30 +0300 Message-ID: <1451575230-11103-1-git-send-email-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.4.10 MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: US-EXCH.sw.swsoft.com (10.255.249.47) To US-EXCH2.sw.swsoft.com (10.255.249.46) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't use 'bounds-strict' checker. It's a new checker that showed up in GCC 6. It appeared to cause a lot of false positives in dynamically allocated structs which has array as the last field, e.g: [ 72.707515] UBSAN: Undefined behaviour in kernel/pid.c:506:23 [ 72.707517] index 2 is out of range for type 'upid [1]' Anyway, we have KASAN for these kind of bugs, so we won't loose much by disabling bounds-strict. Signed-off-by: Andrey Ryabinin --- scripts/Makefile.ubsan | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/Makefile.ubsan b/scripts/Makefile.ubsan index 0a0b36d..8ab6867 100644 --- a/scripts/Makefile.ubsan +++ b/scripts/Makefile.ubsan @@ -6,7 +6,6 @@ ifdef CONFIG_UBSAN CFLAGS_UBSAN += $(call cc-option, -fsanitize=null) CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow) CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds) - CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds-strict) CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size) CFLAGS_UBSAN += $(call cc-option, -fsanitize=returns-nonnull-attribute) CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool) -- 2.4.10