Skip to content

Commit

Permalink
Add missing DEBUG_FAIL_NULL for gcbifs
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Guyot <[email protected]>
  • Loading branch information
pguyot committed Jun 30, 2024
1 parent f1d0dc4 commit b40ec7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libAtomVM/opcodesswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -5273,6 +5273,7 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)

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

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

const struct ExportedFunction *exported_bif = mod->imported_funcs[bif];
GCBifImpl3 func = EXPORTED_FUNCTION_TO_GCBIF(exported_bif)->gcbif3_ptr;
DEBUG_FAIL_NULL(func);
term ret = func(ctx, fail_label, live, arg1, arg2, arg3);
if (UNLIKELY(term_is_invalid_term(ret))) {
if (fail_label) {
Expand Down

0 comments on commit b40ec7f

Please sign in to comment.