Skip to content

Fix PktUART crash and cleanup modcompile/template#3387

Closed
BsAtHome wants to merge 4 commits intoLinuxCNC:masterfrom
BsAtHome:fix_modcompile
Closed

Fix PktUART crash and cleanup modcompile/template#3387
BsAtHome wants to merge 4 commits intoLinuxCNC:masterfrom
BsAtHome:fix_modcompile

Conversation

@BsAtHome
Copy link
Copy Markdown
Contributor

@BsAtHome BsAtHome commented Mar 26, 2025

There is a crash in PktUART hm2_pktuart_send() because a queued read is issued with a local stack variable. The stack will be trashed when the queued read is resolved because the variable no longer exists. This PR removed the queued read. We have to assume that the send procedure succeeds.

The module compile makefile is updated to use -O2 instead of -Os and adds -Wextra (it was missed in #3363).

Also, the modcompile program is updated to take command-line arguments (see also #3380) and now properly removes temporary files, unless instructed to keep them. The modbus template is fixed to handle -O2 and -Wextra without warnings. Additionally, some known divide-by-zero errors in the template have been guarded as well.

@andypugh
Copy link
Copy Markdown
Collaborator

andypugh commented Apr 2, 2025

Do you think that this should go into 2.9 instead? It seems to be largely bug-fixes.

@BsAtHome
Copy link
Copy Markdown
Contributor Author

BsAtHome commented Apr 3, 2025

It needs to go in both because it is a crash-bug. I'll backport it too.

@BsAtHome BsAtHome marked this pull request as draft April 24, 2025 14:32
@BsAtHome
Copy link
Copy Markdown
Contributor Author

Replaced by #3409 and #3414.

@BsAtHome BsAtHome closed this Apr 27, 2025
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.

2 participants