diff options
author | Sverker Eriksson <[email protected]> | 2015-11-10 15:43:15 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-11-10 15:43:15 +0100 |
commit | 949de78331b9c4ecb9c628bb651cecb113790e2e (patch) | |
tree | 108bbaeb677a9f0445ca5580e2d6034be8f58161 /erts/emulator/beam/bif.c | |
parent | 1eeb980a3591b51f12363543b2ac9b0260ebd870 (diff) | |
download | otp-949de78331b9c4ecb9c628bb651cecb113790e2e.tar.gz otp-949de78331b9c4ecb9c628bb651cecb113790e2e.tar.bz2 otp-949de78331b9c4ecb9c628bb651cecb113790e2e.zip |
erts: Fix bug in setnode/2
that could lead strange things to happen when renaming a node with
a name that already exist in node and dist tables.
Problem:
erts_set_this_node() is a bit brutal and does not handle the case
when an old remote node name is reused as the new local node name.
Solution:
Treat erts_this_node and erts_this_dist_entry as all the others
with correct reference counting.
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 4e3a1cef69..6c61b0de6b 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -4231,6 +4231,7 @@ BIF_RETTYPE list_to_pid_1(BIF_ALIST_1) goto bad; enp = erts_find_or_insert_node(dep->sysname, dep->creation); + ASSERT(enp != erts_this_node); etp = (ExternalThing *) HAlloc(BIF_P, EXTERNAL_THING_HEAD_SIZE + 1); etp->header = make_external_pid_header(1); |