Skip to content

Fix DAQ configuration validation and event linking - #127

Open
pamirmundt wants to merge 1 commit into
vectorgrp:masterfrom
pamirmundt:fix/daq-configuration-memory-safety
Open

Fix DAQ configuration validation and event linking#127
pamirmundt wants to merge 1 commit into
vectorgrp:masterfrom
pamirmundt:fix/daq-configuration-memory-safety

Conversation

@pamirmundt

Copy link
Copy Markdown
Contributor

Summary

Fix DAQ configuration commands that could partially modify internal state after returning an error, and make DAQ event-list linking safe and repeatable.

Changes

  • Validate proposed DAQ, ODT, and ODT-entry counts before updating configuration state.
  • Preserve ODT sizes and entry metadata when WRITE_DAQ validation fails.
  • Validate fixed event identifiers when no dynamic event list is available.
  • Prevent invalid event-list traversal, duplicate links, and cycles when associating DAQ lists with events.
  • Add focused regression tests covering allocation rollback, ODT-size rollback, and multiple DAQ lists sharing an event.
  • Document the new daq_config_test target.

Why

A rejected DAQ configuration command could previously leave counters or metadata partially updated. This made a valid retry fail or operate on inconsistent state.

Repeatedly associating a DAQ list with an event could also create an invalid linked list or cycle.

Validation

  • GCC build and regression test passed.
  • Clang build and regression test passed.
  • AddressSanitizer and UndefinedBehaviorSanitizer passed.
  • All default test targets build successfully.
  • Existing test targets retain their original compile configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant