lua: track reference ownership with ASAN when present

This commit is contained in:
Björn Linse
2021-03-27 10:30:15 +01:00
parent abdda66410
commit 5ed383057b
4 changed files with 54 additions and 14 deletions

View File

@@ -16,6 +16,8 @@ void nlua_add_api_functions(lua_State *lstate) REAL_FATTR_NONNULL_ALL;
EXTERN LuaRef nlua_nil_ref INIT(= LUA_NOREF);
EXTERN LuaRef nlua_empty_dict_ref INIT(= LUA_NOREF);
EXTERN int nlua_refcount INIT(= 0);
#define set_api_error(s, err) \
do { \
Error *err_ = (err); \