Skip to content

Commit

Permalink
Fix arithmetic exception caused by uninitialized checkpoint freq
Browse files Browse the repository at this point in the history
  • Loading branch information
mjain-jump committed Apr 30, 2024
1 parent d0bb44d commit d90a4dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/disco/tvu/fd_tvu.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ void solcap_setup( char const * capture_fpath, fd_valloc_t valloc, solcap_setup_

void capture_ctx_setup( fd_runtime_ctx_t * runtime_ctx, fd_runtime_args_t * args,
solcap_setup_t * solcap_setup_out, fd_valloc_t valloc ) {
/* TODO: needs a refactor */
runtime_ctx->capture_ctx = NULL;
runtime_ctx->capture_file = NULL;

Expand All @@ -726,7 +727,6 @@ void capture_ctx_setup( fd_runtime_ctx_t * runtime_ctx, fd_runtime_args_t * args

runtime_ctx->capture_ctx->checkpt_path = NULL;
runtime_ctx->capture_ctx->checkpt_slot = 0;
runtime_ctx->capture_ctx->checkpt_freq = ULONG_MAX;
runtime_ctx->capture_ctx->pruned_funk = NULL;
}

Expand All @@ -747,6 +747,10 @@ void capture_ctx_setup( fd_runtime_ctx_t * runtime_ctx, fd_runtime_args_t * args
runtime_ctx->capture_ctx->capture = NULL;
}

if ( runtime_ctx->capture_ctx ) {
runtime_ctx->capture_ctx->checkpt_freq = ULONG_MAX;
}

if ( has_checkpt_dump ) {
runtime_ctx->capture_ctx->checkpt_slot = args->checkpt_slot;
runtime_ctx->capture_ctx->checkpt_path = args->checkpt_path;
Expand Down

0 comments on commit d90a4dd

Please sign in to comment.