Skip to content

Commit

Permalink
Merge pull request #40953 from smorovic/13_1_X-fix-noninitialized
Browse files Browse the repository at this point in the history
DAQ: fix noninitialized pointer in input source
  • Loading branch information
cmsbuild committed Mar 6, 2023
2 parents fd99ce3 + ff6fa44 commit 2e0e4aa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions EventFilter/Utilities/src/FedRawDataInputSource.cc
Expand Up @@ -1202,14 +1202,23 @@ void FedRawDataInputSource::readSupervisor() {
break;
}
//in single-buffer mode put single chunk in the file and let the main thread read the file
InputChunk* newChunk;
InputChunk* newChunk = nullptr;
//should be available immediately
while (!freeChunks_.try_pop(newChunk)) {
usleep(100000);
if (quit_threads_.load(std::memory_order_relaxed))
if (quit_threads_.load(std::memory_order_relaxed)) {
stop = true;
break;
}
}

if (newChunk == nullptr) {
stop = true;
}

if (stop)
break;

std::unique_lock<std::mutex> lkw(mWakeup_);

unsigned int toRead = eventChunkSize_;
Expand Down

0 comments on commit 2e0e4aa

Please sign in to comment.