Skip to content

Commit

Permalink
Remove asserts for debugging OSS-Fuzz
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin D. Howard <[email protected]>
  • Loading branch information
gavinhoward committed Jun 18, 2024
1 parent 6fe6364 commit c2352eb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,8 @@ bc_vm_shutdown(void)
bc_parse_free(&vm->prs);
bc_program_free(&vm->prog);

assert(false);

bc_slabvec_free(&vm->slabs);
#endif // !BC_ENABLE_LIBRARY

Expand Down Expand Up @@ -1504,16 +1506,12 @@ bc_vm_exec(void)

assert(!BC_ENABLE_OSSFUZZ || BC_EXPR_EXIT == 0);

assert(vm->exprs.len);

// If there are expressions to execute...
if (vm->exprs.len)
{
// Process the expressions.
bc_vm_exprs();

assert(false);

// Sometimes, executing expressions means we need to quit.
if (!vm->no_exprs && vm->exit_exprs && BC_EXPR_EXIT) return;
}
Expand Down Expand Up @@ -1848,8 +1846,6 @@ bc_vm_atexit(BcStatus status)
bc_vec_free(&vm->jmp_bufs);
#endif // BC_DEBUG

assert(false);

return s;
}
#endif // BC_ENABLE_LIBRARY

0 comments on commit c2352eb

Please sign in to comment.