This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] Add no_sanitize attribute
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Martin Liška <mliska at suse dot cz>, Sandra Loosemore <sandra at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 7 Oct 2018 14:15:07 +0200 (CEST)
- Subject: Re: [wwwdocs] Add no_sanitize attribute
- References: <1ad45e0c-b5a2-872d-089e-0a9e4c66b525@suse.cz>
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
===================================================================
> <li>
> New <code>no_sanitize</code> 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 <code>-fsanitize</code> option can be
> provided.
> <blockquote><pre>
> void __attribute__ ((no_sanitize ("alignment", "object-size")))
> f () { /* Do something. */; }
> </pre></blockquote>
> </li>
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.
</li>
<li>
- New <code>no_sanitize</code> 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 <code>-fsanitize</code> option can be
- provided.
+ A new attribute <code>no_sanitize</code> can be applied to functions
+ to instruct the compiler not to do sanitization of any of the options
+ specified. Acceptable values for <code>no_sanitize</code> match those
+ acceptable by the <code>-fsanitize</code> command-line option.
<blockquote><pre class="blackbg">
void __attribute__ ((no_sanitize ("alignment", "object-size")))
f () { /* Do something. */; }</pre></blockquote>
Gerald