From: Mathieu Desnoyers Date: Tue, 18 Feb 2020 00:25:01 +0000 (-0500) Subject: Fix: tracepoint.h: Disable address sanitizer on pointer array section variables X-Git-Tag: v2.11.1~2 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=5d17a2b186ccd9156f4901ac70cfb36762db975e;hp=5d17a2b186ccd9156f4901ac70cfb36762db975e;p=lttng-ust.git Fix: tracepoint.h: Disable address sanitizer on pointer array section variables The tracepoint header declares pointer global variables meant to be placed contiguously within the __tracepoints_ptrs section, and then used as an array of pointers when loading an executable or shared object. Clang Address Sanitizer adds redzones around each variable, thus leading to detection of a global buffer overflow. Those redzones should not be placed within this section, because it defeats its purpose. Therefore, teach asan not to add redzones around those variables with an attribute. Note that there does not appear to be any issue with gcc (tested with gcc-8 with address sanitization enabled), and gcc ignores the no_sanitize_address attribute when applied to a global variable. Fixes: #1238 Signed-off-by: Mathieu Desnoyers ---