aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-04-08 12:11:11 +0200
committerMicael Karlberg <[email protected]>2019-04-17 16:56:33 +0200
commit94fff0ec8e8a4cd47281a9a1628ddf56e638ca10 (patch)
tree7a6e2a4a15b824bb95f11511c18afed3fa7911ed /erts
parent5d615169a0854231c99f4a39d5c4033e58134ae1 (diff)
downloadotp-94fff0ec8e8a4cd47281a9a1628ddf56e638ca10.tar.gz
otp-94fff0ec8e8a4cd47281a9a1628ddf56e638ca10.tar.bz2
otp-94fff0ec8e8a4cd47281a9a1628ddf56e638ca10.zip
[socket] Building term with terms from different env (again)
When building the (activate next) select message, used terms from different environments, which is not allowed. This was during cancel of one request, we tries to activate next, and then building the select message (with terms from different environments). Arg! Details... OTP-15496
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/nifs/common/socket_nif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/nifs/common/socket_nif.c b/erts/emulator/nifs/common/socket_nif.c
index b48f0e05d4..75a3058253 100644
--- a/erts/emulator/nifs/common/socket_nif.c
+++ b/erts/emulator/nifs/common/socket_nif.c
@@ -17603,9 +17603,10 @@ int esock_select_cancel(ErlNifEnv* env,
"\r\n ref: %T" \
"\r\n", reqP->pid, reqP->ref) ); \
\
+ /* We need to copy req ref to 'env' */ \
if ((sres = esock_select_##S(env, descP->sock, descP, \
&reqP->pid, sockRef, \
- reqP->ref)) < 0) { \
+ CP_TERM(env, reqP->ref))) < 0) { \
\
/* We need to inform this process, reqP->pid, */ \
/* that we failed to select, so we don't leave */ \