diff options
author | Sverker Eriksson <[email protected]> | 2014-09-30 16:55:06 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-01-21 16:08:28 +0100 |
commit | 57d819805eb032605c64a0128dd70955d7aa085a (patch) | |
tree | b87e6901b1df11ea450fc90c74df323f7b73f002 | |
parent | 25237481ccccd3ddfa74582dc267632ad618ba30 (diff) | |
download | otp-57d819805eb032605c64a0128dd70955d7aa085a.tar.gz otp-57d819805eb032605c64a0128dd70955d7aa085a.tar.bz2 otp-57d819805eb032605c64a0128dd70955d7aa085a.zip |
erts: Fix erlang:port_set_data/2 for non immediate data
hsize field was not set leading to VM crash
-rw-r--r-- | erts/emulator/beam/erl_bif_port.c | 1 |
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 3cd53ef65d..f4ab8592ae 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); |