Skip to content

Commit b2c451e

Browse files
committed
Merge pull request #1224 from pguyot/w26/add-missing-DEBUG_FAIL_NULL
Add missing DEBUG_FAIL_NULL for gcbifs These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents dfdccd4 + b40ec7f commit b2c451e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libAtomVM/opcodesswitch.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5273,6 +5273,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
52735273

52745274
const struct ExportedFunction *exported_bif = mod->imported_funcs[bif];
52755275
GCBifImpl1 func = EXPORTED_FUNCTION_TO_GCBIF(exported_bif)->gcbif1_ptr;
5276+
DEBUG_FAIL_NULL(func);
52765277
term ret = func(ctx, fail_label, live, arg1);
52775278
if (UNLIKELY(term_is_invalid_term(ret))) {
52785279
if (fail_label) {
@@ -5320,6 +5321,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
53205321

53215322
const struct ExportedFunction *exported_bif = mod->imported_funcs[bif];
53225323
GCBifImpl2 func = EXPORTED_FUNCTION_TO_GCBIF(exported_bif)->gcbif2_ptr;
5324+
DEBUG_FAIL_NULL(func);
53235325
term ret = func(ctx, fail_label, live, arg1, arg2);
53245326
if (UNLIKELY(term_is_invalid_term(ret))) {
53255327
if (fail_label) {
@@ -5393,6 +5395,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
53935395

53945396
const struct ExportedFunction *exported_bif = mod->imported_funcs[bif];
53955397
GCBifImpl3 func = EXPORTED_FUNCTION_TO_GCBIF(exported_bif)->gcbif3_ptr;
5398+
DEBUG_FAIL_NULL(func);
53965399
term ret = func(ctx, fail_label, live, arg1, arg2, arg3);
53975400
if (UNLIKELY(term_is_invalid_term(ret))) {
53985401
if (fail_label) {

0 commit comments

Comments
 (0)