Fix: tracepoint.h: Disable address sanitizer on pointer array section variables
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 18 Feb 2020 00:25:01 +0000 (19:25 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 18 Feb 2020 01:19:58 +0000 (20:19 -0500)
commita4df804d841f3a3df4f9e4a8276ac7cd45c4d36d
treed7294f8552a310e1b371842d18330d4116e6ef1b
parentfaef9f9d8cb9a5508f6431f9bca34a55dd809dc5
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 <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h
include/lttng/ust-compiler.h
This page took 0.025465 seconds and 4 git commands to generate.