aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-09-12 20:03:16 +0200
committerSverker Eriksson <[email protected]>2017-09-12 20:03:16 +0200
commitef0a90d9ebf0922df027dce904fea989ce138a54 (patch)
treeaa3a7c12d0a7abfcb3ae31be30ac211621875d16 /erts/emulator/beam
parentcffb99eec48da1afba341808d53a5d3e1c848e28 (diff)
parentc8cf0eb3af418ee505f6726258cb5d34b14f8867 (diff)
downloadotp-ef0a90d9ebf0922df027dce904fea989ce138a54.tar.gz
otp-ef0a90d9ebf0922df027dce904fea989ce138a54.tar.bz2
otp-ef0a90d9ebf0922df027dce904fea989ce138a54.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_port_task.c9
-rw-r--r--erts/emulator/beam/erl_process.c1
2 files changed, 7 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c
index 1420fb9c06..14977dfa17 100644
--- a/erts/emulator/beam/erl_port_task.c
+++ b/erts/emulator/beam/erl_port_task.c
@@ -1438,10 +1438,10 @@ erts_port_task_schedule(Eterm id,
erts_thr_progress_unmanaged_continue(dhndl);
}
- if (!pp)
- goto fail;
-
if (type != ERTS_PORT_TASK_PROC_SIG) {
+ if (!pp)
+ goto fail;
+
ptp = port_task_alloc();
ptp->type = type;
@@ -1479,6 +1479,9 @@ erts_port_task_schedule(Eterm id,
ptp->u.alive.td.psig.callback = va_arg(argp, ErtsProc2PortSigCallback);
ptp->u.alive.flags |= va_arg(argp, int);
va_end(argp);
+ if (!pp)
+ goto fail;
+
if (!(ptp->u.alive.flags & ERTS_PT_FLG_NOSUSPEND))
set_tmp_handle(ptp, pthp);
else {
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index e27d562505..d5cbf811cc 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -12133,6 +12133,7 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
p->msg.first = NULL;
p->msg.last = &p->msg.first;
p->msg.save = &p->msg.first;
+ p->msg.saved_last = &p->msg.first;
p->msg.len = 0;
p->msg_inq.first = NULL;
p->msg_inq.last = &p->msg_inq.first;