From patchwork Fri Oct 17 07:27:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 400430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C28B5140081 for ; Fri, 17 Oct 2014 18:29:14 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; q=dns; s= default; b=EGdypOp1YYUlLMNMyy6KcOesHZzCArKuO1GbVzT70MU1WXS07sA6P xPDkBce87RTasrKMGr3Jq2WxxAfCixNNv7/pBENCBQDWNZTiJbg3tTC4tIuddo8E zDdnfvjqKab1frRllME/iO76xEfBHjWODfFVPsKNeKzej4aQwGcrvM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=default; bh=L8OxsDCTILjy3ypFqk752vyxnP8=; b=rxNgDUi9DW2PduJ+XyoZkdA49evu o48U9pe5yPbGSnrTbztvUJjHiJqeeK828hdLXYh3/kJTood+gp6Vha4WWK6Qsmlh 1Dg/XncMw1KhvepP61WaxJxXKe19EoPrVQR2Ern54mfk1XFPk9YYt0nSSw2AB3FK FFosZECLMNnoRZ0= Received: (qmail 28022 invoked by alias); 17 Oct 2014 07:29:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 28006 invoked by uid 89); 17 Oct 2014 07:29:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 17 Oct 2014 07:29:06 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id AE56827503DC; Fri, 17 Oct 2014 09:29:03 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bJlvQue9xKqo; Fri, 17 Oct 2014 09:29:03 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 8F331274FC74; Fri, 17 Oct 2014 09:29:02 +0200 (CEST) From: Eric Botcazou To: Yury Gribov Cc: Dmitry Vyukov , gcc-patches@gcc.gnu.org, Jakub Jelinek , Konstantin Khlebnikov , Andrey Ryabinin , Viacheslav Garbuzov Subject: Re: [PATCH 9/17] Initial KAsan support Date: Fri, 17 Oct 2014 09:27:58 +0200 Message-ID: <2117376.AL8OH6CNAI@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: <543F845C.2090908@samsung.com> References: <543F831B.4090502@samsung.com> <543F845C.2090908@samsung.com> MIME-Version: 1.0 > The patch was slightly updated to take care of missing UBSan work > (SANITIZE_FLOAT_DIVIDE, SANITIZE_FLOAT_CAST, SANITIZE_BOUNDS). Why aren't you using opts->x_ here, like all the code just above? --- a/gcc/opts.c +++ b/gcc/opts.c @@ -868,6 +868,20 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, /* The -gsplit-dwarf option requires -gpubnames. */ if (opts->x_dwarf_split_debug_info) opts->x_debug_generate_pub_sections = 1; + + /* Userspace and kernel ASan conflict with each other and with TSan. */ + + if ((flag_sanitize & SANITIZE_USER_ADDRESS) + && (flag_sanitize & SANITIZE_KERNEL_ADDRESS)) + error_at (loc, + "-fsanitize=address is incompatible with " + "-fsanitize=kernel-address"); + + if ((flag_sanitize & SANITIZE_ADDRESS) + && (flag_sanitize & SANITIZE_THREAD)) + error_at (loc, + "-fsanitize=address and -fsanitize=kernel-address " + "are incompatible with -fsanitize=thread"); }