aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-21 19:55:34 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-21 19:55:34 +0200
commit10cff76885554ab11ebfef2ef83cee9ec7fe410a (patch)
tree24cea26483fbd435f76ae16c1279c5f84548043f
parent58c0f8de7a27a659fe2b534a86752f67da1af998 (diff)
downloadotp-10cff76885554ab11ebfef2ef83cee9ec7fe410a.tar.gz
otp-10cff76885554ab11ebfef2ef83cee9ec7fe410a.tar.bz2
otp-10cff76885554ab11ebfef2ef83cee9ec7fe410a.zip
erts: Fix copy share with onheap messages
-rw-r--r--erts/emulator/beam/erl_gc.c20
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;