From 9d8e886380c048a8fb234dd495af5d5391ba5a2e Mon Sep 17 00:00:00 2001 From: Georgy Evtushenko Date: Thu, 3 Jun 2021 16:01:39 +0300 Subject: [PATCH] Fix OOB access in FlagHeadsAndTails --- cub/block/block_discontinuity.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cub/block/block_discontinuity.cuh b/cub/block/block_discontinuity.cuh index 37b8c29925..8c72a2405a 100644 --- a/cub/block/block_discontinuity.cuh +++ b/cub/block/block_discontinuity.cuh @@ -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::FlagT( flag_op, preds[0],