aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-09-30 16:55:06 +0200
committerSverker Eriksson <[email protected]>2014-09-30 16:55:06 +0200
commitbfc6a9b3325969a7bc1d0c228766537049a4f637 (patch)
treecfe818c85d331d06895f79f9e528c0c29b0c81ac /erts/emulator
parent743ed31108ee555db18d9833186865e85e34333e (diff)
downloadotp-bfc6a9b3325969a7bc1d0c228766537049a4f637.tar.gz
otp-bfc6a9b3325969a7bc1d0c228766537049a4f637.tar.bz2
otp-bfc6a9b3325969a7bc1d0c228766537049a4f637.zip
erts: Fix erlang:port_set_data/2 for non immediate data
hsize field was not set leading to VM crash
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_bif_port.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c
index afb33c1cdb..8a622e5e6e 100644
--- a/erts/emulator/beam/erl_bif_port.c
+++ b/erts/emulator/beam/erl_bif_port.c
@@ -554,6 +554,7 @@ BIF_RETTYPE port_set_data_2(BIF_ALIST_2)
hp = &pdhp->heap[0];
pdhp->off_heap.first = NULL;
pdhp->off_heap.overhead = 0;
+ pdhp->hsize = hsize;
pdhp->data = copy_struct(BIF_ARG_2, hsize, &hp, &pdhp->off_heap);
data = (erts_aint_t) pdhp;
ASSERT((data & 0x3) == 0);