Non utf8 output causes panic in interpreter discovery
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Search the interpreter discovery code for String::from_utf8(...).unwrap() handling probed executable output. Update the output handling so non-UTF-8 stdout does not panic, then verify that discovery completes when a probe emits invalid UTF-8.
Written by the indexing model from the issue text.
Description
On some machines (as detected by Zed crash telemetry), toolchain discovery panics because a probed executable’s stdout is not valid UTF-8.
For example, we received:
b"\xCE\xC4\xBC\xFE\xB2\xBB\xB4\xE6\xD4\xDA: E:\\<redacted>\\-c\r\n"
This (according to my LLM) is GBK-encoding of 文件不存在: E:\<redacted>\-c, “File does not exist.”
I'm not sure why the executable appears to interpret -c as a filename, but I don't think we should panic on its output. Using String::from_utf8_lossy instead of String::from_utf8(...).unwrap() should address this.
- Dominant language
- Rust
- Stars
- 207
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/python-environment-tools
-
bug needs PR
Difficulty 4/5 3-5 days Newbie friendliness 65/100
-
microsoft/python-environment-tools#520 · 2 comments · 1 assignee ·
All issues in microsoft/python-environment-tools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·