Skip to content

Conversation

@Xylphy
Copy link
Contributor

@Xylphy Xylphy commented Feb 9, 2026

Fixes #10750

Summary
Fixes a ptx panic triggered by non-ASCII input (e.g., emoji) when calculating the “after” chunk width.

Root cause: max_after_size was computed using byte lengths (.len()), while the output chunking logic operates on characters. With multibyte Unicode, this can make max_after_size smaller than the number of characters actually appended, tripping assert!(max_after_size >= after.len()).

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

GNU testsuite comparison:

Note: The gnu test tests/cut/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/tail/tail-n0f is now passing!

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.

ptx <<< "012345678901234567890123456789🛠" SIGABRT

1 participant