Skip to content

Fix bugs in Rd53b/ItkpixV2 DataProcessors

Luc Tomas Le Pottier requested to merge feedback_bugfix into devel

A previous attempt to fix segfaults in the Rd53B/ITKPixV2 DataProcessors removed the passing of End-of-iteration feedback to the analysis, causing the PixelFeedback scan to hang up indefinitely. To fix this, but maintain the protection from lost data made by the previous commit, we do the following:

  • If _curOut is not nullptr:
    • Push data remaining in the _curOut buffer (_curOut = nullptr)
  • Reinitialize _curOut to contain the end-of-iteration status marker from _curInV
  • Push _curOut buffer again to pass end-of-iteration marker further downstream, to analysis

Behavior has been verified for both Rd53b and ITKPixV2, with digital, analog, globalthreshold, pixelthreshold, selftrigger, and noise scans.

One problem discovered: the line returning early from the getNextDataBlock function leaves open the possibility of an increase in _rawDataIdx without gathering of the associated data. If there are no waiting data blocks, this can immediately cause a segfault at the next increase of the block index, (line 481). While this line was originally included to catch an edge case, it can easily cause segfaults in ITKPixV2 selftrigger_source scans.

Edited by Luc Tomas Le Pottier

Merge request reports

Loading