]> gcc.gnu.org Git - gcc.git/commit
d: Add `@no_sanitize' attribute to compiler and library.
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 15 Jun 2022 20:51:52 +0000 (22:51 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Wed, 15 Jun 2022 21:16:21 +0000 (23:16 +0200)
commit90f2a111413a6d4264335046d68ffa19725864b6
tree566e5fee798421401ae158412b179351a25e7c52
parentdc9b92facf87a6f2d8b0e5d5fc404f30c3b15a74
d: Add `@no_sanitize' attribute to compiler and library.

The `@no_sanitize' attribute disables a particular sanitizer for this
function, analogous to `__attribute__((no_sanitize))'.  The library also
defines `@noSanitize' to be compatible with the LLVM D compiler's
`ldc.attributes'.

gcc/d/ChangeLog:

* d-attribs.cc (d_langhook_attribute_table): Add no_sanitize.
(d_handle_no_sanitize_attribute): New function.

libphobos/ChangeLog:

* libdruntime/gcc/attributes.d (no_sanitize): Define.
(noSanitize): Define.

gcc/testsuite/ChangeLog:

* gdc.dg/asan/attr_no_sanitize1.d: New test.
* gdc.dg/ubsan/attr_no_sanitize2.d: New test.
gcc/d/d-attribs.cc
gcc/testsuite/gdc.dg/asan/attr_no_sanitize1.d [new file with mode: 0644]
gcc/testsuite/gdc.dg/ubsan/attr_no_sanitize2.d [new file with mode: 0644]
libphobos/libdruntime/gcc/attributes.d
This page took 0.062991 seconds and 6 git commands to generate.