diff options
author | Lukas Larsson <[email protected]> | 2017-02-22 15:34:13 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-02-22 15:34:13 +0100 |
commit | 84c821dc97fae0d035b3158fb7a3f97320ad413b (patch) | |
tree | f1b0e549a1ff6d5ad94b89f8c247d8fdbbdeea31 /erts/emulator | |
parent | a4ac87e2cb953b23f87b46498fd921ac6709f7e9 (diff) | |
parent | ae5ab58d64d18365a9b94a780760fd9c50119900 (diff) | |
download | otp-84c821dc97fae0d035b3158fb7a3f97320ad413b.tar.gz otp-84c821dc97fae0d035b3158fb7a3f97320ad413b.tar.bz2 otp-84c821dc97fae0d035b3158fb7a3f97320ad413b.zip |
Merge branch 'maint'
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/io.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index e0cc756887..f24528635b 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -4882,10 +4882,16 @@ erts_port_control(Process* c_p, ASSERT(!tmp_alloced); if (*ebinp == HEADER_SUB_BIN) ebinp = binary_val(((ErlSubBin *) ebinp)->orig); + if (*ebinp != HEADER_PROC_BIN) copy = 1; else { - binp = ((ProcBin *) ebinp)->val; + ProcBin *pb = (ProcBin *) ebinp; + + if (pb->flags) + erts_emasculate_writable_binary(pb); + + binp = pb->val; ASSERT(bufp <= bufp + size); ASSERT(binp->orig_bytes <= bufp && bufp + size <= binp->orig_bytes + binp->orig_size); |