#5904·fprime

Svc/PassiveRateGroup: cycleTime used uninitialized when RawTime::getDiffUsec fails

Author: lestarch-autobotCreated Sep 10, 2026Updated Sep 16, 2026
LabelsbugC++
F´ Version devel @ nasa/fprime b7dd5c4f8d26
Affected Component Svc/PassiveRateGroup
Severity 3/5

Problem Description

PassiveRateGroup.cpp:81 and :101 declare U32 cycleTime; and assign it only via (void)portEnd.getDiffUsec(portStart, cycleTime). Os::RawTimeInterface::getDiffUsec (Os/DelegateRawTime.cpp) returns without writing result on INVALID_PARAMS/NOT_SUPPORTED/OTHER_ERROR, all legal for a project RawTime implementation. The indeterminate value feeds the max-cycle CAS loop and the PortCycleTime/CycleTime/MaxCycleTime telemetry.

Context / Environment

Found by static AI full-codebase review of nasa/fprime devel at commit b7dd5c4f8d268c5c70f0304a063d8ee27e026168 (current devel tip at posting time). Static finding; fprime-util version-check not applicable.

Finding id(s): 0d7418619c8e

How to Reproduce

  1. Use a RawTime implementation whose getTimeInterval returns NOT_SUPPORTED.
  2. Observe garbage MaxCycleTime telemetry.

Expected Behavior

Initialize cycleTime = 0 and skip the update (or emit a one-shot event) when the status is not OP_OK.


IAMAI