Commit 6a6bd1e
DEV-793 Fix midday/midnight-split regression from the raw byte-advance
0d65311 (adversarial-review finding 3) switched the sensor-data byte walk
to the raw data-block size so the midday/midnight split recompute could not
corrupt the variable-length LSM6DSV FIFO walk. But a split block appears in
listOfDataBlocksInOrder as TWO entries whose recomputed sizes sum to the
on-disk size - advancing by the raw size for each part counts the block
twice, misaligning every subsequent block and eventually overrunning the
payload buffer (ArrayIndexOutOfBoundsException in parseDataBlockData).
Caught by ASM_PC_00005 Test_022, the only midday/midnight-straddling
dataset in the suite; it was not part of the 0d65311 re-run set.
The walk now advances split parts by their own recomputed share and unsplit
blocks by the raw size (identical for unsplit fixed-packet blocks; raw
remains the only valid measure for the unsplit LSM6DSV tagged FIFO). A
split LSM6DSV block now fails loudly instead of silently misparsing -
sample-count arithmetic cannot locate the split point in a tagged FIFO,
and no such recording exists yet.
Verified: Test_022 back to green against unchanged references.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 0d65311 commit 6a6bd1e
1 file changed
Lines changed: 19 additions & 2 deletions
File tree
- ShimmerDriver/src/main/java/com/shimmerresearch/verisense/payloaddesign
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
414 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
415 | 432 | | |
416 | 433 | | |
417 | 434 | | |
| |||
0 commit comments