Handle race condition in querying current program size
m_program shall refer to some other location which contains the current program.
Since the program is updated on a timer (asynchronously), a race might occur
if this function is called whilst the program is currently being updated.
MODIFY
src/processorhandler.cpp
src/processorhandler.cpp
@@ -134,7 +134,7 @@ void ProcessorHandler::selectProcessor(const ProcessorID& id, RegisterInitializa
int ProcessorHandler::getCurrentProgramSize() const {
if (m_program) {
const auto* textSection = m_program->getSection(TEXT_SECTION_NAME);
- assert(textSection);
+ if (textSection)
return textSection->data.length();
}

Handle race condition in querying current program size

m_program shall refer to some other location which contains the current program.
Since the program is updated on a timer (asynchronously), a race might occur
if this function is called whilst the program is currently being updated.