diff options
author | Sverker Eriksson <[email protected]> | 2016-11-01 11:40:48 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-11-01 11:40:48 +0100 |
commit | 24485c421f15b00d0b5c97633d701373b53897a5 (patch) | |
tree | 449b998694507e6407fc93b0e014768eb89bd80e /erts/emulator/beam/erl_nif.c | |
parent | f27fdee291673134d5cd626f0ba6b11fbc305052 (diff) | |
download | otp-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.c | 6 |
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 */ |