Skip to content

Commit

Permalink
bugfix: pgstromTaskStateResetScan() may reference uninitialized pg_state
Browse files Browse the repository at this point in the history
issue reported at heterodb#700
  • Loading branch information
kaigai committed Dec 25, 2023
1 parent 7d312e8 commit 346cd25
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/executor.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,13 @@ pgstromTaskStateResetScan(pgstromTaskState *pts)
TableScanDesc scan = pts->css.ss.ss_currentScanDesc;
int num_devs = 0;

/*
* pgstromExecTaskState() is never called on the single process
* execution, thus we have no state to reset.
*/
if (!ps_state)
return;

if ((pts->xpu_task_flags & DEVKIND__NVIDIA_GPU) != 0)
num_devs = numGpuDevAttrs;
else if ((pts->xpu_task_flags & DEVKIND__NVIDIA_DPU) != 0)
Expand Down

0 comments on commit 346cd25

Please sign in to comment.