diff options
author | Sverker Eriksson <[email protected]> | 2017-01-09 15:13:58 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-01-12 16:09:33 +0100 |
commit | 9e9e7bf64fa97663dd4fb645c014880205fb46db (patch) | |
tree | f24986cf2050d85ac12d0e2bfc2f8b48dc048604 /erts/emulator/beam/global.h | |
parent | fb4e0f8726d2e3033164fe6e44c49351c6b641de (diff) | |
download | otp-9e9e7bf64fa97663dd4fb645c014880205fb46db.tar.gz otp-9e9e7bf64fa97663dd4fb645c014880205fb46db.tar.bz2 otp-9e9e7bf64fa97663dd4fb645c014880205fb46db.zip |
erts: Add assertions for correct ErlNifEnv
when constructing container terms.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r-- | erts/emulator/beam/global.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index 2b2f3c5cdc..5d07490152 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -45,6 +45,9 @@ struct enif_func_t; +#ifdef DEBUG +# define ERTS_NIF_ASSERT_IN_ENV +#endif struct enif_environment_t /* ErlNifEnv */ { struct erl_module_nif* mod_nif; @@ -57,6 +60,10 @@ struct enif_environment_t /* ErlNifEnv */ int exception_thrown; /* boolean */ Process *tracee; int exiting; /* boolean (dirty nifs might return in exiting state) */ + +#ifdef ERTS_NIF_ASSERT_IN_ENV + int dbg_disable_assert_in_env; +#endif }; extern void erts_pre_nif(struct enif_environment_t*, Process*, struct erl_module_nif*, Process* tracee); |