diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-22 13:23:11 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-04-22 13:23:11 +0300 |
commit | a482a42aab20bf1a3bc9ce75fd16c419d2727aee (patch) | |
tree | ff488856382aca274b99fe342ffdb7243cf23419 /contrib/python/cffi | |
parent | b2f7430fa7f25600bd783681cddaef95d5f194f6 (diff) | |
download | ydb-a482a42aab20bf1a3bc9ce75fd16c419d2727aee.tar.gz |
intermediate changes
ref:363c37688efcb336560beba78d1acf0737637ef6
Diffstat (limited to 'contrib/python/cffi')
-rw-r--r-- | contrib/python/cffi/c/lib_obj.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/python/cffi/c/lib_obj.c b/contrib/python/cffi/c/lib_obj.c index 38bf3d5510..be389838db 100644 --- a/contrib/python/cffi/c/lib_obj.c +++ b/contrib/python/cffi/c/lib_obj.c @@ -15,6 +15,18 @@ __getattr__. */ +#if defined(_asan_enabled_) +void __lsan_ignore_object(const void* p); +#endif + +inline static void MarkAsIntentionallyLeaked(const void* ptr) { +#if defined(_asan_enabled_) + __lsan_ignore_object(ptr); +#else + (void)ptr; +#endif +} + struct CPyExtFunc_s { PyMethodDef md; void *direct_fn; @@ -340,6 +352,7 @@ static PyObject *lib_build_and_cache_attr(LibObject *lib, PyObject *name, PyErr_NoMemory(); return NULL; } + MarkAsIntentionallyLeaked(data); ((void(*)(char*))g->address)(data); } x = convert_to_object(data, ct); |