diff options
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_db_util.c | 4 | ||||
-rw-r--r-- | erts/emulator/beam/erl_time_sup.c | 2 | ||||
-rw-r--r-- | erts/emulator/beam/external.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c index c2f6cfa933..1aa0cb4552 100644 --- a/erts/emulator/beam/erl_db_util.c +++ b/erts/emulator/beam/erl_db_util.c @@ -2995,7 +2995,7 @@ Eterm db_copy_from_comp(DbTableCommon* tb, DbTerm* bp, Eterm** hpp, } ASSERT((*hpp - hp) <= bp->size); #ifdef DEBUG_CLONE - ASSERT(eq_rel(make_tuple(hp),make_tuple(bp->debug_clone),bp->debug_clone)); + ASSERT(eq_rel(make_tuple(hp),NULL,make_tuple(bp->debug_clone),bp->debug_clone)); #endif return make_tuple(hp); } @@ -3018,7 +3018,7 @@ Eterm db_copy_element_from_ets(DbTableCommon* tb, Process* p, hp += extra; HRelease(p, endp, hp); #ifdef DEBUG_CLONE - ASSERT(eq_rel(copy, obj->debug_clone[pos], obj->debug_clone)); + ASSERT(eq_rel(copy, NULL, obj->debug_clone[pos], obj->debug_clone)); #endif return copy; } diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c index 1d0735aa99..e6962a700b 100644 --- a/erts/emulator/beam/erl_time_sup.c +++ b/erts/emulator/beam/erl_time_sup.c @@ -757,7 +757,7 @@ local_to_univ(Sint *year, Sint *month, Sint *day, refuses to give us a DST time, we simulate the Linux/Solaris behaviour of giving the same data as if is_dst was not set. */ t.tm_isdst = 0; - if (erl_mktime(&the_clock, &t)) { + if (erl_mktime(&the_clock, &t) < 0) { /* Failed anyway, something else is bad - will be a badarg */ return 0; } 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); |