Skip to content

backlog: run commands longer than 127 characters - #2240

Open
wulfftech wants to merge 1 commit into
openshwprojects:mainfrom
wulfftech:backlog-long-commands
Open

wulfftech wants to merge 1 commit into
openshwprojects:mainfrom
wulfftech:backlog-long-commands

Conversation

@wulfftech

Copy link
Copy Markdown

Each command in a backlog gets copied into char copy[128] before it runs. Anything past 127 characters is silently dropped. So a long command works when you send it on its own, and the same command inside a backlog quietly does something else. On its own it gets the tokenizer's 512.

This splits one heap copy of the backlog in place instead, so every command keeps its full length. Splitting is unchanged: on ;, with empty commands handled the same way. Backlogs with delay_ms, delay_s or waitFor go through the script VM and aren't touched.

Added a case to Test_Backlog: one command over 127 characters, with the value sitting past the old cut. It fails on main and passes here. Unit tests pass, plain, ASan and UBSan.

The 128-byte limit on a whole /cm command got fixed at the HTTP layer a while back (elektroda topic3942155). This is the same limit one level down.

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