diff options
author | Sverker Eriksson <[email protected]> | 2019-04-09 16:35:04 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2019-04-09 17:04:38 +0200 |
commit | 1ba8bf12eddb363481b1b5856af7c4d7c3313e52 (patch) | |
tree | 4d883e299f23936ce46e27c3f7497a19b5f082ac /erts/emulator/beam/external.c | |
parent | a99df168b6d7ce37cfff781347ca8a15aaab133b (diff) | |
download | otp-1ba8bf12eddb363481b1b5856af7c4d7c3313e52.tar.gz otp-1ba8bf12eddb363481b1b5856af7c4d7c3313e52.tar.bz2 otp-1ba8bf12eddb363481b1b5856af7c4d7c3313e52.zip |
Revert "erts: Make DFLAG_BIG_CREATION mandatory"
This reverts commit 321dc6ee0241f802c940def174c0a77262e11f21.
Diffstat (limited to 'erts/emulator/beam/external.c')
-rw-r--r-- | erts/emulator/beam/external.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c index 0d00bfe2e8..71bcab1f57 100644 --- a/erts/emulator/beam/external.c +++ b/erts/emulator/beam/external.c @@ -51,17 +51,18 @@ #define MAX_STRING_LEN 0xffff -/* - * MAX value for the creation field in pid, port and reference - * for the old PID_EXT, PORT_EXT, REFERENCE_EXT and NEW_REFERENCE_EXT. - * Older nodes (OTP 19-21) will send us these so we must be able to decode them. - * - * From OTP 22 DFLAG_BIG_CREATION is mandatory so this node will always - * encode with new big 32-bit creations using NEW_PID_EXT, NEW_PORT_EXT - * and NEWER_REFERENCE_EXT. +/* MAX value for the creation field in pid, port and reference + for the local node and for the current external format. + + Larger creation values than this are allowed in external pid, port and refs + encoded with NEW_PID_EXT, NEW_PORT_EXT and NEWER_REFERENCE_EXT. + The point here is to prepare for future upgrade to 32-bit creation. + OTP-19 (erts-8.0) can handle big creation values from other (newer) nodes, + but do not use big creation values for the local node yet, + as we still may have to communicate with older nodes. */ -#define ERTS_MAX_TINY_CREATION (3) -#define is_tiny_creation(Cre) ((unsigned)(Cre) <= ERTS_MAX_TINY_CREATION) +#define ERTS_MAX_LOCAL_CREATION (3) +#define is_valid_creation(Cre) ((unsigned)(Cre) <= ERTS_MAX_LOCAL_CREATION) #undef ERTS_DEBUG_USE_DIST_SEP #ifdef DEBUG @@ -2519,7 +2520,7 @@ dec_pid(ErtsDistExternal *edep, ErtsHeapFactory* factory, byte* ep, if (tag == PID_EXT) { cre = get_int8(ep); ep += 1; - if (!is_tiny_creation(cre)) { + if (!is_valid_creation(cre)) { return NULL; } } else { @@ -3520,7 +3521,7 @@ dec_term_atom_common: if (tag == PORT_EXT) { cre = get_int8(ep); ep++; - if (!is_tiny_creation(cre)) { + if (!is_valid_creation(cre)) { goto error; } } @@ -3567,7 +3568,7 @@ dec_term_atom_common: cre = get_int8(ep); ep += 1; - if (!is_tiny_creation(cre)) { + if (!is_valid_creation(cre)) { goto error; } goto ref_ext_common; @@ -3581,7 +3582,7 @@ dec_term_atom_common: cre = get_int8(ep); ep += 1; - if (!is_tiny_creation(cre)) { + if (!is_valid_creation(cre)) { goto error; } r0 = get_int32(ep); |