diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-21 19:55:34 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-21 19:55:34 +0200 |
commit | 10cff76885554ab11ebfef2ef83cee9ec7fe410a (patch) | |
tree | 24cea26483fbd435f76ae16c1279c5f84548043f /erts/emulator | |
parent | 58c0f8de7a27a659fe2b534a86752f67da1af998 (diff) | |
download | otp-10cff76885554ab11ebfef2ef83cee9ec7fe410a.tar.gz otp-10cff76885554ab11ebfef2ef83cee9ec7fe410a.tar.bz2 otp-10cff76885554ab11ebfef2ef83cee9ec7fe410a.zip |
erts: Fix copy share with onheap messages
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index f33ade27f3..4698458521 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -2053,8 +2053,26 @@ copy_one_frag(Eterm** hpp, ErlOffHeap* off_heap, *hp++ = val; break; case TAG_PRIMARY_LIST: +#ifdef SHCOPY_SEND + if (erts_is_literal(val,list_val(val))) { + *hp++ = val; + } else { + *hp++ = offset_ptr(val, offs); + } +#else + *hp++ = offset_ptr(val, offs); +#endif + break; case TAG_PRIMARY_BOXED: - *hp++ = offset_ptr(val, offs); +#ifdef SHCOPY_SEND + if (erts_is_literal(val,boxed_val(val))) { + *hp++ = val; + } else { + *hp++ = offset_ptr(val, offs); + } +#else + *hp++ = offset_ptr(val, offs); +#endif break; case TAG_PRIMARY_HEADER: *hp++ = val; |