Skip to content

Core dump when read_per_shot in sdbuf is not a multiple of 2

Description:

When setting read_per_shot in the sdbuf module to a number that isn't a multiple of 2, the system throws a core dump error on the server side, resulting in a complete board crash.

Steps to Reproduce:

  1. Set read_per_shot to any odd number (e.g., 1, 3, 5, etc.).
  2. Add the sdbuf read channel to the assembler.
  3. Observe a core dump from the server and subsequent board crash.

Expected Behavior:

The system should gracefully handle cases when read_per_shot isn't a multiple of 2 without crashing.

Quick Fix Suggestion:

Pad the reads internally to ensure read_per_shot is rounded up to the nearest multiple of 2.


Edited by Neel Vora