diff options
author | Sverker Eriksson <[email protected]> | 2017-01-13 18:19:30 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-01-13 18:19:30 +0100 |
commit | d74d7a4cc0808e1f6e710e5d17ec55bfe093cdd9 (patch) | |
tree | b87ffcb61a80a31fd5fb9bd96ca132d4e4cd2bf5 /erts/emulator | |
parent | 3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff) | |
download | otp-d74d7a4cc0808e1f6e710e5d17ec55bfe093cdd9.tar.gz otp-d74d7a4cc0808e1f6e710e5d17ec55bfe093cdd9.tar.bz2 otp-d74d7a4cc0808e1f6e710e5d17ec55bfe093cdd9.zip |
erts: Fix enif_send from noproc and no msg_env
Only try direct allocation on receiver heap when called
in a real process context to avoid trylock on our own main lock.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 6b265a8b80..dd4b88e4a3 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -690,7 +690,7 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid, Uint sz = size_object(msg); ErlOffHeap *ohp; Eterm *hp; - if (env && !env->tracee) { + if (c_p && !env->tracee) { full_flush_env(env); mp = erts_alloc_message_heap(rp, &rp_locks, sz, &hp, &ohp); full_cache_env(env); |