Bug #1231 » 0001-Fix-plugin-dev.h-Disable-address-sanitizer-on-pointe.patch
include/babeltrace2/plugin/plugin-dev.h | ||
---|---|---|
}; \
|
||
static struct __bt_plugin_component_class_descriptor_attribute const * const __bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name##_ptr __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS = &__bt_plugin_##_type##_component_class_descriptor_attribute_##_id##_##_component_class_id##_##_attr_name
|
||
#if defined(__clang__) || defined (__GNUC__)
|
||
# define __BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
|
||
#else
|
||
# define __BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#endif
|
||
/*
|
||
* Variable attributes for a plugin descriptor pointer to be added to
|
||
* the plugin descriptor section (internal use).
|
||
*/
|
||
#ifdef __APPLE__
|
||
#define __BT_PLUGIN_DESCRIPTOR_ATTRS \
|
||
__attribute__((section("__DATA,btp_desc"), used))
|
||
__attribute__((section("__DATA,btp_desc"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
|
||
__start___bt_plugin_descriptors
|
||
... | ... | |
#else
|
||
#define __BT_PLUGIN_DESCRIPTOR_ATTRS \
|
||
__attribute__((section("__bt_plugin_descriptors"), used))
|
||
__attribute__((section("__bt_plugin_descriptors"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_DESCRIPTOR_BEGIN_SYMBOL \
|
||
__start___bt_plugin_descriptors
|
||
... | ... | |
*/
|
||
#ifdef __APPLE__
|
||
#define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
|
||
__attribute__((section("__DATA,btp_desc_att"), used))
|
||
__attribute__((section("__DATA,btp_desc_att"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
|
||
__start___bt_plugin_descriptor_attributes
|
||
... | ... | |
#else
|
||
#define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_ATTRS \
|
||
__attribute__((section("__bt_plugin_descriptor_attributes"), used))
|
||
__attribute__((section("__bt_plugin_descriptor_attributes"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
|
||
__start___bt_plugin_descriptor_attributes
|
||
... | ... | |
*/
|
||
#ifdef __APPLE__
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
|
||
__attribute__((section("__DATA,btp_cc_desc"), used))
|
||
__attribute__((section("__DATA,btp_cc_desc"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
|
||
__start___bt_plugin_component_class_descriptors
|
||
... | ... | |
#else
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRS \
|
||
__attribute__((section("__bt_plugin_component_class_descriptors"), used))
|
||
__attribute__((section("__bt_plugin_component_class_descriptors"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_BEGIN_SYMBOL \
|
||
__start___bt_plugin_component_class_descriptors
|
||
... | ... | |
*/
|
||
#ifdef __APPLE__
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
|
||
__attribute__((section("__DATA,btp_cc_desc_att"), used))
|
||
__attribute__((section("__DATA,btp_cc_desc_att"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
|
||
__start___bt_plugin_component_class_descriptor_attributes
|
||
... | ... | |
#else
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_ATTRS \
|
||
__attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used))
|
||
__attribute__((section("__bt_plugin_component_class_descriptor_attributes"), used)) \
|
||
__BT_PLUGIN_ATTRIBUTE_NO_SANITIZE_ADDRESS
|
||
#define __BT_PLUGIN_COMPONENT_CLASS_DESCRIPTOR_ATTRIBUTES_BEGIN_SYMBOL \
|
||
__start___bt_plugin_component_class_descriptor_attributes
|