diff options
author | Sverker Eriksson <[email protected]> | 2018-03-20 19:24:42 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2018-03-20 19:24:42 +0100 |
commit | 8fea289244d8758c69b8c8443679b2d73cb2f70d (patch) | |
tree | 4bd2e84dea4678e2cc7094ec20bf2d7c742bbd49 /erts/emulator/beam/erl_nif.c | |
parent | 5b557bccac579291301a7a4d78a3d992b4e9373d (diff) | |
download | otp-8fea289244d8758c69b8c8443679b2d73cb2f70d.tar.gz otp-8fea289244d8758c69b8c8443679b2d73cb2f70d.tar.bz2 otp-8fea289244d8758c69b8c8443679b2d73cb2f70d.zip |
erts: Remove our own NIF modules from "taints"
Dynamic NIF libs and those added with config option
--enable-static-nifs are considered as taints.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 0720796b53..8dcecd79f0 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -3892,6 +3892,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2) ErtsSysDdllError errdesc = ERTS_SYS_DDLL_ERROR_INIT; Eterm ret = am_ok; int veto; + int taint = 1; struct erl_module_nif* lib = NULL; struct erl_module_instance* this_mi; struct erl_module_instance* prev_mi; @@ -3944,6 +3945,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2) if (sne != NULL) { init_func = sne->nif_init; handle = init_func; + taint = sne->taint; } } this_mi = &module_p->curr; @@ -3982,7 +3984,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2) " function: '%s'", errdesc.str); } - else if ((erts_add_taint(mod_atom), + else if ((taint ? erts_add_taint(mod_atom) : 0, (entry = erts_sys_ddll_call_nif_init(init_func)) == NULL)) { ret = load_nif_error(BIF_P, bad_lib, "Library init-call unsuccessful"); } |