diff options
author | John Högberg <[email protected]> | 2018-02-19 15:36:40 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-02-19 15:36:40 +0100 |
commit | d19fc31cba8670c2fc09a7911b4e329052a3a23d (patch) | |
tree | 84fd21890a8786cc176db71a8c517e5a86107933 /erts/emulator/beam/erl_io_queue.c | |
parent | 474b2ef465cddf41d311464c48bf99dd007f270f (diff) | |
parent | 443fbb24248516523512c9bc591252eafafd1311 (diff) | |
download | otp-d19fc31cba8670c2fc09a7911b4e329052a3a23d.tar.gz otp-d19fc31cba8670c2fc09a7911b4e329052a3a23d.tar.bz2 otp-d19fc31cba8670c2fc09a7911b4e329052a3a23d.zip |
Merge branch 'john/erts/fix-iolist-bitstring-badarg/OTP-14926' into maint
Diffstat (limited to 'erts/emulator/beam/erl_io_queue.c')
-rw-r--r-- | erts/emulator/beam/erl_io_queue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_io_queue.c b/erts/emulator/beam/erl_io_queue.c index 990c0c1cac..eb156cc578 100644 --- a/erts/emulator/beam/erl_io_queue.c +++ b/erts/emulator/beam/erl_io_queue.c @@ -1203,7 +1203,10 @@ BIF_RETTYPE iolist_to_iovec_1(BIF_ALIST_1) { if (is_nil(BIF_ARG_1)) { BIF_RET(NIL); } else if (is_binary(BIF_ARG_1)) { - if (binary_size(BIF_ARG_1) != 0) { + if (binary_bitsize(BIF_ARG_1) != 0) { + ASSERT(!(BIF_P->flags & F_DISABLE_GC)); + BIF_ERROR(BIF_P, BADARG); + } else if (binary_size(BIF_ARG_1) != 0) { Eterm *hp = HAlloc(BIF_P, 2); BIF_RET(CONS(hp, BIF_ARG_1, NIL)); |