Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overflow in ECAL GPU unpacking [12.5.x] #39618

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EventFilter/EcalRawToDigi/plugins/UnpackGPU.cu
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace ecal {
const uint64_t mask =
0xC0001000D0000000 + (uint64_t(TOWER_L1_MASK) << TOWER_L1_B) + (uint64_t(TOWER_BX_MASK) << TOWER_BX_B);

while (next_tower_block != trailer) {
while (next_tower_block < trailer) {
if ((*next_tower_block & mask) == sign) {
current_tower_block = next_tower_block;
return uint8_t(*next_tower_block & TOWER_ID_MASK);
Expand Down Expand Up @@ -232,7 +232,7 @@ namespace ecal {
auto const* current_tower_block = tower_blocks_start;
uint8_t iCh = 0;
uint8_t next_tower_id = exp_ttids[iCh];
while (current_tower_block != trailer && iCh < numbChannels) {
while (current_tower_block < trailer && iCh < numbChannels) {
auto const w = *current_tower_block;
uint8_t ttid = w & TOWER_ID_MASK;
uint16_t bxlocal = (w >> TOWER_BX_B) & TOWER_BX_MASK;
Expand Down