Initialize httpOnly in the HttpCookie constructor initializer list.
cppcheck identified httpOnly as potentially uninitialized.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Initialize pass_, hack_0_, and hack_1_ in the FT8 constructor
initializer list.
cppcheck identified these members as potentially uninitialized.
Initializing them makes the constructor state explicit and reduces
the risk of undefined behavior if they are read before being assigned.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
stop() tore the sample thread down with stopWork() + delete and only then
cleared m_deviceShared.m_thread. The buddy's applySettings() suspends and
resumes that thread through m_thread from another thread, without holding
this device's mutex, so it could restart the thread between stopWork() and
delete (QThread: Destroyed while thread is still running -> qFatal/abort),
or call through the pointer after the delete. The device's own
applySettings() had the same exposure on its own thread pointer, since it
does not take m_mutex either.
Seen when the Satellite Tracker loads presets into the Rx and Tx device
sets of one Pluto at AOS: abort in PlutoSDRInputThread::~PlutoSDRInputThread
<- PlutoSDRInput::stop <- DSPDeviceSourceEngine::gotoIdle.
Add DevicePlutoSDRShared::m_threadsMutex (recursive, shared by all PlutoSDR
device sets) and take it in start() around startWork()/publish, in stop()
and handleError() around unpublish + teardown (unpublishing first), in
suspendBuddies()/resumeBuddies(), and for the whole suspend -> apply ->
resume sequence in applySettings(). Also wait() before deleting the thread
and check the own-thread pointer before resuming it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provide Codacy AI reviewers with SDRangel-specific context for
architecture, testing, documentation, generated code, and review scope.
Provide list of directories to ignore (which match .gitattributes)
Add the badge to the Readme.md
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Both PlutoSDRInput::applySettings() and PlutoSDROutput::applySettings()
suspend their buddies' threads and resume them later:
if (buddySharedPtr && buddySharedPtr->m_threadWasRunning) {
buddySharedPtr->m_thread->startWork(); // m_thread may be null
The suspend half tests buddySharedPtr->m_thread and sets
m_threadWasRunning from it, but m_threadWasRunning is sticky state on the
buddy's shared struct: between suspend and resume the buddy's thread can
be destroyed -- its device was stopped, or a preset was loaded into it,
both of which null m_thread -- while m_threadWasRunning stays true.
startWork() is then called on a null pointer.
Seen on macOS with the Satellite Tracker, which loads a preset into the
Rx and the Tx device set of the same Pluto at AOS: the Tx applySettings
is between suspend and resume when the Rx side is rebuilt.
PlutoSDROutput::applySettings + 7284
PlutoSDROutput::handleMessage
DeviceSampleSink::handleInputMessages
MessageQueue::push
PlutoSDROutput::deserialize
DeviceAPI::loadSamplingDeviceSettings
DeviceUISet::loadDeviceSetSettings
Disassembly confirms the faulting load is m_thread's vtable read with
x0 = 0. Test m_thread, as the suspend half does.
PlutoSDRInput::start() guards both m_deviceShared.m_deviceParams and
m_deviceShared.m_deviceParams->getBox(); PlutoSDROutput::start() only
guards getBox() and dereferences m_deviceParams to get there.
m_deviceParams is null when the device never opened (no route to the
iio host, radio rebooting, or -- on macOS -- the Local Network privacy
grant denied, which is silent), and closeDevice() also sets it to 0.
Pressing Start on such a device set then dereferences null and crashes
the application. Mirror the Input side's check.
Use CSPICE's & BladeRF's binary-tree library path when CMAKE_BUILD_TYPE
is None, while retaining SDRangel's external library path for configured builds.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Set DOWNLOAD_EXTRACT_TIMESTAMP to TRUE for the Boost download to use
extraction timestamps and avoid CMP0135 warnings and stale file
timestamps when the downloaded archive changes.
Signed-off-by: Robin Getz <rgetz503@gmail.com>
Remove DEPENDS from add_custom_command(TARGET ...) calls. DEPENDS is
supported by the OUTPUT form but not the TARGET form used here.
CMake 3.30 and earlier silently ignored the unsupported argument.
CMake 3.31 introduced CMP0175, which warns about invalid arguments.
Signed-off-by: Robin Getz <rgetz503@gmail.com>