Fix slave FSM starvation and EoE NULL pointer dereference in master#161
Merged
sittner merged 5 commits intoparallel-slave-configfrom Mar 2, 2026
Merged
Conversation
… non-TTY builds Co-authored-by: sittner <1475582+sittner@users.noreply.github.com>
…g-files Exclude service scripts, config files, and ectty.h from userspace master installs
…slave.c Co-authored-by: sittner <1475582+sittner@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix bugs in ec_master_exec_slave_fsms function and type error
Fix slave FSM starvation and EoE NULL pointer dereference in master
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent bugs in the EtherCAT master: one causing all slave FSMs after a pending datagram to be silently skipped, and one causing a NULL pointer dereference in the EoE failure path.
Changes
master/master.c—ec_master_exec_slave_fsms():return→continuewhen a slave FSM's datagram is still in INIT/QUEUED/SENT state. Usingreturncaused the entire loop to exit early, starving all subsequent FSMs infsm_exec_listfor that cycle.master/fsm_slave.c— EoE failure path: Fixed typo wherefsm->soe_request->statewas written inside theif (fsm->eoe_request)guard. Whenfsm->soe_requestis NULL (butfsm->eoe_requestis not), this dereferences a NULL pointer.Original prompt
This pull request was created from Copilot chat.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.