Skip to content

Potential overflow in Panel Completer #5

@alonyado

Description

@alonyado

Description:When outlier settings for input signals are misconfigured, the model processes extreme values instead of filtering them out. This leads to excessively high values that cause a numeric overflow during resolution adjustment.

Reproduction Steps:

  1. Configuration: Set the outlier threshold to 0 (effectively disabling or bypassing the filter).
  2. Input: Use an MCH value of 43 and an RBC value of 1e-6.
  3. Observation: The RBC value is not flagged as an outlier. This results in a calculated value of 430 million 43 / 10^-6*10.
  4. Error: When the system adjusts for a resolution of 0.1 (dividing by 0.1), the value spikes to 4.3 B, triggering an overflow.

Relevant code from RepProcessor.h:

inline float set_resolution(float value, float res) { return res * (int)(value / res + 0.5); }

There is conversion to integer after division by resolution (which is 0.1) that causes the int to bypass 4.3B overflow limit.

Resolution:

  • add protection before arithmetic in the PanelCompleter code.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions