From 2f38d2ea0537107def8514dc2e0c680ff8d31ca8 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Thu, 6 Feb 2020 09:17:52 +0100 Subject: Improves compatibility with AddressSanitizers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address sanitizers is expecting shared objects loaded without the flag RTLD_DEEPBIND. This can be achieved by setting the environment variable AFB_NO_RTLD_DEEPBIND to the value 1 (exactly). This implies that the binder takes care of not clashing the namespaces by defining the symbol afbBindingV3root in both environment: the binder and the bindings. Bug-AGL: SPEC-3040 Bug-AGL: SPEC-3162 Signed-off-by: José Bollo Change-Id: Ic064590178d4cf8b34b939e4c9ecd587668f71b8 --- include/afb/afb-binding-v3.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/afb/afb-binding-v3.h') diff --git a/include/afb/afb-binding-v3.h b/include/afb/afb-binding-v3.h index 79d36da5..8e11fe8b 100644 --- a/include/afb/afb-binding-v3.h +++ b/include/afb/afb-binding-v3.h @@ -139,10 +139,12 @@ struct afb_binding_v3 * @see afbBindingV3 * @see @ref validity-v3 */ +#if !defined(AFB_BINDING_NO_ROOT) /* use with caution, see @ref validity-v3 */ #if AFB_BINDING_VERSION != 3 extern #endif struct afb_api_x3 *afbBindingV3root __attribute__((weak)); +#endif /** * Pre-initialization function. -- cgit 1.2.3-korg