aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-11-01 11:40:48 +0100
committerSverker Eriksson <[email protected]>2016-11-01 11:40:48 +0100
commit24485c421f15b00d0b5c97633d701373b53897a5 (patch)
tree449b998694507e6407fc93b0e014768eb89bd80e /erts/emulator/beam/erl_nif.c
parentf27fdee291673134d5cd626f0ba6b11fbc305052 (diff)
downloadotp-24485c421f15b00d0b5c97633d701373b53897a5.tar.gz
otp-24485c421f15b00d0b5c97633d701373b53897a5.tar.bz2
otp-24485c421f15b00d0b5c97633d701373b53897a5.zip
erts: Add notsup error for load_nif/2 from hipe code
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index c5606f72a1..9872a3ab81 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -3166,6 +3166,12 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
struct erl_module_instance* this_mi;
struct erl_module_instance* prev_mi;
+ if (BIF_P->flags & F_HIPE_MODE) {
+ ret = load_nif_error(BIF_P, "notsup", "Calling load_nif from HiPE compiled "
+ "modules not supported");
+ BIF_RET(ret);
+ }
+
encoding = erts_get_native_filename_encoding();
if (encoding == ERL_FILENAME_WIN_WCHAR) {
/* Do not convert the lib name to utf-16le yet, do that in win32 specific code */