Skip to content

hostmot2: use the H entry's pins for two-part sserial encoders - #4635

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:sserial-encoder-h-pins
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:sserial-encoder-h-pins

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

LBP_ENCODER_L entries get no HAL pins, but the two-part Fanuc encoder reassembly in hm2_sserial_read_pins falls through into the encoder body with whichever entry completes the pair. A format that lists H before L runs the body on the L entry's pins and dereferences handles that were never created, killing the realtime thread. Redirect the body to the matching LBP_ENCODER_H entry's pin set, and refuse the pair with an error when no H entry exists.

One of three candidates for @andypugh's hostmot2 SIGSEGV on master (see #4453, #4632). Split out of #4626.

LBP_ENCODER_L entries get no HAL pins, but the two-part Fanuc encoder
reassembly fell through into the encoder body with whichever entry
completed the pair. When a format lists the H part before the L part
the body ran on the L entry's pins and dereferenced handles that were
never created. Redirect the body to the matching LBP_ENCODER_H
entry's pin set, and refuse the pair with an error when no H entry
exists.
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