Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #319 from senior-zero/main-bug/github/find_heads_a…
Browse files Browse the repository at this point in the history
…nd_tails_oob/314

Fix OOB access in FlagHeadsAndTails
  • Loading branch information
alliepiper committed Jun 14, 2021
2 parents e3ee09f + 9d8e886 commit 0c7d105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cub/block/block_discontinuity.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -747,13 +747,13 @@ public:
T preds[ITEMS_PER_THREAD];

// Set flag for first thread-item
preds[0] = temp_storage.last_items[linear_tid - 1];
if (linear_tid == 0)
{
head_flags[0] = 1;
}
else
{
preds[0] = temp_storage.last_items[linear_tid - 1];
head_flags[0] = ApplyOp<FlagOp>::FlagT(
flag_op,
preds[0],
Expand Down

0 comments on commit 0c7d105

Please sign in to comment.