Skip to content

SCT_ReadCalibDataCondAlg::coerceToFloatRange: check against std::numeric_limits<float>::min

Walter Lampl requested to merge wlampl/athena:SCTReadCondAlg_FPEFix into 24.0

While working on something else, I came across an FPE Overflow in the SCT_ReadCalibDataCondAlg.

The origin on the FPE is:

[Switching to Thread 0x7fe83c892640 (LWP 946627)]
0x00007fe8415259c0 in (anonymous namespace)::coerceToFloatRange (value=-1.07709e+130) at /home/wlampl/master/athena/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ReadCalibDataCondAlg.cxx:25
25	    else return static_cast<float>(value);

The method coerceToFloatRange is designed to cap values larger than std::numeric_limits<float>::max(). The case I found, looks like a value below std::numeric_limits<float>::min()

This MR extends coerceToFloatRange to limit the value on both ends. I did not do any investigations why we end up with such an awkward number and why this is happening now. Maybe @sroe knows ... The input RAW file where this FPE occurred is data24_13p6TeV.00482819.physics_Main.daq.RAW._lb0357._SFO-18._0003.data

Merge request reports