Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Disable Address Sanitizer instrumentation of the lin...



details:   https://anonhg.NetBSD.org/src/rev/d10b40980372
branches:  trunk
changeset: 746096:d10b40980372
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Mar 21 22:52:48 2020 +0000

description:
Disable Address Sanitizer instrumentation of the link_set objects

The link_set array must contain consecutive elements that can be iterated.

GCC disables instrumentation of globals for user-defined sections and this
__noasan attribute is implicit for this compiler. For Clang it is required
to be specified explicitly.

diffstat:

 sys/sys/cdefs_elf.h |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 7e93e1d9cd91 -r d10b40980372 sys/sys/cdefs_elf.h
--- a/sys/sys/cdefs_elf.h       Sat Mar 21 22:45:47 2020 +0000
+++ b/sys/sys/cdefs_elf.h       Sat Mar 21 22:52:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs_elf.h,v 1.53 2017/08/10 19:03:27 joerg Exp $     */
+/*     $NetBSD: cdefs_elf.h,v 1.54 2020/03/21 22:52:48 kamil Exp $     */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -160,10 +160,10 @@
 #ifndef __lint__
 #define        __link_set_make_entry(set, sym)                                 \
        static void const * const __link_set_##set##_sym_##sym          \
-           __section("link_set_" #set) __used = (const void *)&sym
+           __section("link_set_" #set) __noasan __used = (const void *)&sym
 #define        __link_set_make_entry2(set, sym, n)                             \
        static void const * const __link_set_##set##_sym_##sym##_##n    \
-           __section("link_set_" #set) __used = (const void *)&sym[n]
+           __section("link_set_" #set) __noasan __used = (const void *)&sym[n]
 #else
 #define        __link_set_make_entry(set, sym)                                 \
        extern void const * const __link_set_##set##_sym_##sym



Home | Main Index | Thread Index | Old Index