aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-04-10 15:12:45 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-04-10 15:45:39 +0200
commit1a191c166c446b21f515429fc9987e5a7add5ae5 (patch)
tree79a0ab7930952a74c9060f744bcbdde29a37f067 /erts/emulator/beam
parent26c94c98a598a312b7912b1ef7ae3a7b01abcbf1 (diff)
downloadotp-1a191c166c446b21f515429fc9987e5a7add5ae5.tar.gz
otp-1a191c166c446b21f515429fc9987e5a7add5ae5.tar.bz2
otp-1a191c166c446b21f515429fc9987e5a7add5ae5.zip
erts: Fix building of Map result from match_specs
A faulty "box-value" entered into the heap which could cause a segmentation fault in the garbage collector if it was written on a heap fragment.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_db_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index 0bf562d937..0fb1c397c9 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -2153,8 +2153,8 @@ restart:
break;
case matchMkFlatMap:
n = *pc++;
- ehp = HAllocX(build_proc, 1 + MAP_HEADER_FLATMAP_SZ + n, HEAP_XTRA);
- t = *ehp++ = *--esp;
+ ehp = HAllocX(build_proc, MAP_HEADER_FLATMAP_SZ + n, HEAP_XTRA);
+ t = *--esp;
{
flatmap_t *m = (flatmap_t *)ehp;
m->thing_word = MAP_HEADER_FLATMAP;