Skip to content

sort: fix panic when collator not available in worker threads#10915

Open
sylvestre wants to merge 1 commit intouutils:mainfrom
sylvestre:fix-10909
Open

sort: fix panic when collator not available in worker threads#10915
sylvestre wants to merge 1 commit intouutils:mainfrom
sylvestre:fix-10909

Conversation

@sylvestre
Copy link
Contributor

@sylvestre sylvestre commented Feb 13, 2026

Fixes: #10909

@sylvestre sylvestre changed the title Fix 10909 sort: fix panic when collator not available in worker threads Feb 13, 2026
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/factor/t10. tests/factor/t10 is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/pr/bounded-memory is no longer failing!
Note: The gnu test tests/cut/cut-huge-range is now being skipped but was previously passing.
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!

left.cmp(right)
} else {
// Fall back to byte comparison if collator is not available
COLLATOR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good change to make for being more resilient, but I think the actual error is in the:

.is_some_and(|enc| enc.to_lowercase() == "utf-8")

Where we should probably modify it to also accept without the hyphen:

  .is_some_and(|enc| {
      let lower = enc.to_lowercase();
      lower == "utf-8" || lower == "utf8"
  })

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.

LANG=en_US.utf8 sort -k3 panics

2 participants