aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-03-27 17:13:43 +0100
committerSverker Eriksson <[email protected]>2014-03-27 17:13:43 +0100
commitd1fde60e2814ba1d8013c48983bc206c1112cb98 (patch)
tree39af545d20ec7c5aeccb75b1dbb971694b73a59d
parent32eae452dbd6da109914af3a9003d9bbcb696d42 (diff)
downloadotp-d1fde60e2814ba1d8013c48983bc206c1112cb98.tar.gz
otp-d1fde60e2814ba1d8013c48983bc206c1112cb98.tar.bz2
otp-d1fde60e2814ba1d8013c48983bc206c1112cb98.zip
erts: Adjust is_external_header() for new map tag
to not mistake a map for an external term (pid, port or ref).
-rw-r--r--erts/emulator/beam/erl_term.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h
index 982e63ee31..37014ccf94 100644
--- a/erts/emulator/beam/erl_term.h
+++ b/erts/emulator/beam/erl_term.h
@@ -893,7 +893,8 @@ typedef struct external_thing_ {
(((x) & _TAG_HEADER_MASK) == _TAG_HEADER_EXTERNAL_REF)
#define is_external_header(x) \
- (((x) & (_TAG_HEADER_MASK-_BINARY_XXX_MASK)) == _TAG_HEADER_EXTERNAL_PID)
+ (((x) & (_TAG_HEADER_MASK-_BINARY_XXX_MASK)) == _TAG_HEADER_EXTERNAL_PID \
+ && ((x) & _TAG_HEADER_MASK) != _TAG_HEADER_MAP)
#define is_external(x) (is_boxed((x)) && is_external_header(*boxed_val((x))))