aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-04-13 20:02:21 +0200
committerSverker Eriksson <[email protected]>2016-04-13 20:02:21 +0200
commit350c2beb2ed583aa6b0345e8118615bd3c5ccc9d (patch)
tree15a1ce61cdd43de9f973fcfa88b7bb7f9b39a84c /erts/emulator/beam
parente4b8b9be39601b1c79dfd5d8e807ae4c404b6935 (diff)
downloadotp-350c2beb2ed583aa6b0345e8118615bd3c5ccc9d.tar.gz
otp-350c2beb2ed583aa6b0345e8118615bd3c5ccc9d.tar.bz2
otp-350c2beb2ed583aa6b0345e8118615bd3c5ccc9d.zip
erts: Fix decoding of pids, ports and refs with big creations
Must skip 3 extra bytes after node name atom.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/external.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index 5ea155f83f..243ba8d9f3 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -4425,22 +4425,32 @@ init_done:
SKIP(1+atom_extra_skip);
atom_extra_skip = 0;
break;
- case PID_EXT:
case NEW_PID_EXT:
+ atom_extra_skip = 12;
+ goto case_PID;
+ case PID_EXT:
atom_extra_skip = 9;
+ case_PID:
/* In case it is an external pid */
heap_size += EXTERNAL_THING_HEAD_SIZE + 1;
terms++;
break;
- case PORT_EXT:
case NEW_PORT_EXT:
+ atom_extra_skip = 8;
+ goto case_PORT;
+ case PORT_EXT:
atom_extra_skip = 5;
+ case_PORT:
/* In case it is an external port */
heap_size += EXTERNAL_THING_HEAD_SIZE + 1;
terms++;
break;
- case NEW_REFERENCE_EXT:
case NEWER_REFERENCE_EXT:
+ atom_extra_skip = 4;
+ goto case_NEW_REFERENCE;
+ case NEW_REFERENCE_EXT:
+ atom_extra_skip = 1;
+ case_NEW_REFERENCE:
{
int id_words;
@@ -4451,7 +4461,7 @@ init_done:
goto error;
ep += 2;
- atom_extra_skip = 1 + 4*id_words;
+ atom_extra_skip += 4*id_words;
/* In case it is an external ref */
#if defined(ARCH_64)
heap_size += EXTERNAL_THING_HEAD_SIZE + id_words/2 + 1;