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

DAQ: fix noninitialized pointer in input source #40953

Merged
merged 1 commit into from Mar 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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