From 754e2022059864f2c4025ab67da759bde922a066 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 4 Dec 2018 10:10:37 +0100 Subject: erts: Fix copy of literal msg during gc A copy has to be made of the message as there is a trace token. There was a bug where the actual message was incorrectly modified even if it was a literal. --- erts/emulator/beam/erl_gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts') diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index b4df418cd5..d5dfb096b1 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -2477,7 +2477,7 @@ erts_copy_one_frag(Eterm** hpp, ErlOffHeap* off_heap, *hpp = hp; for (i = 0; i < nrefs; i++) { - if (is_not_immed(refs[i])) + if (is_not_immed(refs[i]) && !erts_is_literal(refs[i],boxed_val(refs[i]))) refs[i] = offset_ptr(refs[i], offs); } bp->off_heap.first = NULL; -- cgit v1.2.3