From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41751 invoked by alias); 7 Oct 2018 17:13:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 41742 invoked by uid 89); 7 Oct 2018 17:13:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=instruct, UD:changes.html, recommendations, changeshtml X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 07 Oct 2018 17:13:43 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g9Cce-0006wc-Qw from Sandra_Loosemore@mentor.com ; Sun, 07 Oct 2018 10:13:40 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Sun, 7 Oct 2018 10:13:38 -0700 Subject: Re: [wwwdocs] Add no_sanitize attribute To: Gerald Pfeifer , =?UTF-8?Q?Martin_Li=c5=a1ka?= CC: References: <1ad45e0c-b5a2-872d-089e-0a9e4c66b525@suse.cz> From: Sandra Loosemore Message-ID: <463ed405-133a-4a5e-c095-07494ed1a881@codesourcery.com> Date: Sun, 07 Oct 2018 19:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-10/txt/msg00389.txt.bz2 On 10/07/2018 06:15 AM, Gerald Pfeifer wrote: > On Wed, 18 Apr 2018, Martin Liška wrote: >> I would like to mention the attribute in GCC 8 changes. > > Index: htdocs/gcc-8/changes.html > =================================================================== >>
  • >> New no_sanitize attribute has been added. The attribute >> on functions is used to inform the compiler that it should >> not do sanitization of all options mentioned in sanitize option. >> A list of values acceptable by -fsanitize option can be >> provided. >>
    >>      void __attribute__ ((no_sanitize ("alignment", "object-size")))
    >>      f () { /* Do something. */; }
    >>      
    >>
  • > > I've been struggling with this from a language perspective and > while not fully happy, believe/hope the below may improve things > a bit. > > Sandra, any recommendations from your end? > > Martin, is my update technically acurate? > > Index: gcc-8/changes.html > =================================================================== > RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v > retrieving revision 1.97 > diff -u -r1.97 changes.html > --- gcc-8/changes.html 30 Sep 2018 14:38:54 -0000 1.97 > +++ gcc-8/changes.html 7 Oct 2018 12:13:03 -0000 > @@ -251,11 +251,10 @@ > tests for pointer wrapping. > >
  • > - New no_sanitize attribute has been added. The attribute > - on functions is used to inform the compiler that it should > - not do sanitization of all options mentioned in sanitize option. > - A list of values acceptable by -fsanitize option can be > - provided. > + A new attribute no_sanitize can be applied to functions > + to instruct the compiler not to do sanitization of any of the options > + specified. Acceptable values for no_sanitize match those > + acceptable by the -fsanitize command-line option. >
    >   void __attribute__ ((no_sanitize ("alignment", "object-size")))
    >   f () { /* Do something. */; }
    > This is definitely an improvement. One more tweak I'd make is s/any of the options specified/the options provided as arguments to the attribute/ -Sandra