public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/58411] New: no_sanitize_undefined function attribute
@ 2013-09-13  9:08 jan.smets@alcatel-lucent.com
  2013-09-13  9:09 ` [Bug sanitizer/58411] " mpolacek at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jan.smets@alcatel-lucent.com @ 2013-09-13  9:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

            Bug ID: 58411
           Summary: no_sanitize_undefined function attribute
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.smets@alcatel-lucent.com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

Request for a no_sanitize_undefined attribute


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug sanitizer/58411] no_sanitize_undefined function attribute
  2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
@ 2013-09-13  9:09 ` mpolacek at gcc dot gnu.org
  2013-09-14  0:10 ` jan.smets@alcatel-lucent.com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-13  9:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-09-13
                 CC|                            |mpolacek at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Mine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug sanitizer/58411] no_sanitize_undefined function attribute
  2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
  2013-09-13  9:09 ` [Bug sanitizer/58411] " mpolacek at gcc dot gnu.org
@ 2013-09-14  0:10 ` jan.smets@alcatel-lucent.com
  2013-09-14  8:31 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jan.smets@alcatel-lucent.com @ 2013-09-14  0:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

--- Comment #2 from Jan Smets <jan.smets@alcatel-lucent.com> ---
Please also think of the other -fsanitize= options.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug sanitizer/58411] no_sanitize_undefined function attribute
  2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
  2013-09-13  9:09 ` [Bug sanitizer/58411] " mpolacek at gcc dot gnu.org
  2013-09-14  0:10 ` jan.smets@alcatel-lucent.com
@ 2013-09-14  8:31 ` mpolacek at gcc dot gnu.org
  2013-09-15 21:43 ` jan.smets@alcatel-lucent.com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-14  8:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug sanitizer/58411] no_sanitize_undefined function attribute
  2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
                   ` (2 preceding siblings ...)
  2013-09-14  8:31 ` mpolacek at gcc dot gnu.org
@ 2013-09-15 21:43 ` jan.smets@alcatel-lucent.com
  2013-09-18 10:01 ` mpolacek at gcc dot gnu.org
  2013-09-18 10:03 ` mpolacek at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jan.smets@alcatel-lucent.com @ 2013-09-15 21:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

--- Comment #3 from Jan Smets <jan.smets@alcatel-lucent.com> ---
Eg, these attributes are useful too I think:

no_sanitize => disable ALL sanitize checks
sanitize -> enable ALL sanitize checks

no_sanitize_{address,undefined,vla...} => disable the specific check
sanitize_{address,undefined,vla...} => enable the specific check

Perhaps the enablers will not be used as much, but it might be useful for
people who want to instrument just one specific function.

The no_sanitize attribute could be used for sensitive code, eg, task scheduler
code, interrupt handlers where someone might choose to never instrument.

Thanks
- Jan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug sanitizer/58411] no_sanitize_undefined function attribute
  2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
                   ` (3 preceding siblings ...)
  2013-09-15 21:43 ` jan.smets@alcatel-lucent.com
@ 2013-09-18 10:01 ` mpolacek at gcc dot gnu.org
  2013-09-18 10:03 ` mpolacek at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-18 10:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Wed Sep 18 10:01:40 2013
New Revision: 202682

URL: http://gcc.gnu.org/viewcvs?rev=202682&root=gcc&view=rev
Log:
2013-09-18  Marek Polacek  <polacek@redhat.com>

    PR sanitizer/58411
    * doc/extend.texi: Document no_sanitize_undefined attribute.
    * builtins.c (fold_builtin_0): Don't sanitize function if it has the
    no_sanitize_undefined attribute.


Added:
    trunk/gcc/testsuite/c-c++-common/ubsan/attrib-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/doc/extend.texi
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug sanitizer/58411] no_sanitize_undefined function attribute
  2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
                   ` (4 preceding siblings ...)
  2013-09-18 10:01 ` mpolacek at gcc dot gnu.org
@ 2013-09-18 10:03 ` mpolacek at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-09-18 10:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58411

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.  I do not plan to add any other attributes at the moment.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-18 10:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-13  9:08 [Bug sanitizer/58411] New: no_sanitize_undefined function attribute jan.smets@alcatel-lucent.com
2013-09-13  9:09 ` [Bug sanitizer/58411] " mpolacek at gcc dot gnu.org
2013-09-14  0:10 ` jan.smets@alcatel-lucent.com
2013-09-14  8:31 ` mpolacek at gcc dot gnu.org
2013-09-15 21:43 ` jan.smets@alcatel-lucent.com
2013-09-18 10:01 ` mpolacek at gcc dot gnu.org
2013-09-18 10:03 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).