diff options
author | Andrey Kazmin <a.kazmin@partner.samsung.com> | 2021-03-31 15:37:23 +0300 |
---|---|---|
committer | Andrey Kazmin <a.kazmin@partner.samsung.com> | 2021-09-10 14:32:12 +0300 |
commit | 5c8b3c76e72f1843812aa93f7c9613841878b836 (patch) | |
tree | e0e93750e470a3753fcf13481a5a212986145962 | |
parent | 4812e104b473a5f3b766bae53347df3185b1e90c (diff) | |
download | python-5c8b3c76e72f1843812aa93f7c9613841878b836.tar.gz python-5c8b3c76e72f1843812aa93f7c9613841878b836.tar.bz2 python-5c8b3c76e72f1843812aa93f7c9613841878b836.zip |
Added no_sanitize_hwaddress attribute for PyObject_Freetizen_7.0_m2_releasetizen_6.5.m2_releasesubmit/tizen_base/20210910.123310submit/tizen_7.0_base_hotfix/20221115.161601submit/tizen_7.0_base/20221028.201101submit/tizen_6.5_base/20211027.201001submit/tizen_6.5_base/20211027.183101submit/tizen_6.5_base/20211026.180901accepted/tizen/base/tool/20210913.002645accepted/tizen/7.0/base/tool/hotfix/20221115.090627accepted/tizen/7.0/base/tool/20221028.122045accepted/tizen/7.0/base/hotfix/20230714.003900accepted/tizen/7.0/base/20230714.003049accepted/tizen/6.5/base/tool/20211027.120703accepted/tizen/6.5/base/20230714.002641tizen_7.0_base_hotfixtizen_7.0_basetizen_6.5_baseaccepted/tizen_7.0_base_tool_hotfixaccepted/tizen_7.0_base_toolaccepted/tizen_7.0_base_hotfixaccepted/tizen_7.0_baseaccepted/tizen_6.5_base_toolaccepted/tizen_6.5_base
Change-Id: I52dc2e8c405064463d84201ee3fb8f5291d47c9b
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
-rw-r--r-- | Objects/obmalloc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index 2067cf5..99b577a 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -8,6 +8,12 @@ #else #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS #endif + #if __has_feature(hwaddress_sanitizer) /* is HWASAN enabled? */ + #define ATTRIBUTE_NO_SANITIZE_HWADDRESS \ + __attribute__((no_sanitize("hwaddress"))) + #else + #define ATTRIBUTE_NO_SANITIZE_HWADDRESS + #endif #else #if defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x, is ASAN enabled? */ #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \ @@ -16,6 +22,12 @@ #else #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS #endif + #if defined(__SANITIZE_HWADDRESS__) /* is HWASAN enabled? */ + #define ATTRIBUTE_NO_SANITIZE_HWADDRESS \ + __attribute__((no_sanitize_hwaddress)) + #else + #define ATTRIBUTE_NO_SANITIZE_HWADDRESS + #endif #endif #ifdef WITH_PYMALLOC @@ -996,6 +1008,7 @@ redirect: #undef PyObject_Free ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS +ATTRIBUTE_NO_SANITIZE_HWADDRESS void PyObject_Free(void *p) { @@ -1227,6 +1240,7 @@ redirect: #undef PyObject_Realloc ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS +ATTRIBUTE_NO_SANITIZE_HWADDRESS void * PyObject_Realloc(void *p, size_t nbytes) { |