From 31e6c79f956f71e80d8f6be48e5ab8df87f2b85c Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 19 Oct 2017 20:44:54 +0200 Subject: Prevent hipe_bs_validate_unicode from doing GC Fix for x86_64 only. The calling native code can not handle a GC as it has a raw pointer where to write the binary data. If a GC happens the data (utf32) will be written to the old deallocated heap. --- erts/emulator/hipe/hipe_bif_list.m4 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/emulator/hipe/hipe_bif_list.m4') diff --git a/erts/emulator/hipe/hipe_bif_list.m4 b/erts/emulator/hipe/hipe_bif_list.m4 index f034c4700c..ada3ab2c83 100644 --- a/erts/emulator/hipe/hipe_bif_list.m4 +++ b/erts/emulator/hipe/hipe_bif_list.m4 @@ -247,7 +247,11 @@ nofail_primop_interface_3(nbif_bs_get_float_2, erts_bs_get_float_2) standard_bif_interface_3(nbif_bs_put_utf8, hipe_bs_put_utf8) standard_bif_interface_3(nbif_bs_put_utf16be, hipe_bs_put_utf16be) standard_bif_interface_3(nbif_bs_put_utf16le, hipe_bs_put_utf16le) +ifdef(`nogc_bif_interface_1',` +nogc_bif_interface_1(nbif_bs_validate_unicode, hipe_bs_validate_unicode) +',` standard_bif_interface_1(nbif_bs_validate_unicode, hipe_bs_validate_unicode) +') /* * Bit-syntax primops without any P parameter. -- cgit v1.2.3