aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/external.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-08-15 21:00:37 +0200
committerSverker Eriksson <[email protected]>2012-08-15 21:00:37 +0200
commit68e0078eb58803dc4a7e0bfd801f32c2c92b7f26 (patch)
tree982ae87e5232a392b576fd2bedf65ef401664e26 /erts/emulator/beam/external.c
parent125f494f3a0e31502d209fd050d16f47b9d417da (diff)
parent29921882be8873f763f6135badc864442de74304 (diff)
downloadotp-68e0078eb58803dc4a7e0bfd801f32c2c92b7f26.tar.gz
otp-68e0078eb58803dc4a7e0bfd801f32c2c92b7f26.tar.bz2
otp-68e0078eb58803dc4a7e0bfd801f32c2c92b7f26.zip
Merge branch 'sverk/ets-compressed-binary-bug/OTP-10182' into maint
* sverk/ets-compressed-binary-bug/OTP-10182: Fix corrupted binaries in compressed ETS tables Make ETS compile with #define DEBUG_CLONE
Diffstat (limited to 'erts/emulator/beam/external.c')
-rw-r--r--erts/emulator/beam/external.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c
index 4348578694..52f45b924f 100644
--- a/erts/emulator/beam/external.c
+++ b/erts/emulator/beam/external.c
@@ -1889,7 +1889,9 @@ enc_term(ErtsAtomCacheMap *acmp, Eterm obj, byte* ep, Uint32 dflags,
*ep++ = BINARY_INTERNAL_REF;
}
if (pb->flags) {
+ char* before_realloc = pb->val->orig_bytes;
erts_emasculate_writable_binary(pb);
+ bytes += (pb->val->orig_bytes - before_realloc);
}
erts_refc_inc(&pb->val->refc, 2);