Skip to content

Conversation

@tardyp
Copy link
Contributor

@tardyp tardyp commented Oct 23, 2025

The issue cannot be reproduced with the former testcase of creating external crates because rust refuses to use "external crate 28_找出字符串中第一个匹配项的下标" because it is not a valid indentifier (starts with number, and contain non ascii chars)

But still using 28_找出字符串中第一个匹配项的下标.rs as a filename is accepted by previous rustc releases So we consider it valid, and add an integration test for it to catch any regression on other code related to non ascii filenames.

Fix #147975

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@tardyp tardyp changed the title fix panic when rustc tries to reduce intermediate filenames length wi… fix panic when rustc tries to reduce intermediate filenames len with utf8 Oct 23, 2025
@tardyp
Copy link
Contributor Author

tardyp commented Oct 23, 2025

not sure of the process for urgent beta fixes.

I uploaded two versions of this patch, this one against master and #148019 against beta

@apiraino
Copy link
Contributor

not sure of the process for urgent beta fixes.

I uploaded two versions of this patch, this one against master and #148019 against beta

Thanks @tardyp! Patches for regressions can either be fixed on the master branch (like this one) or directly on the beta branch. In practice I think there is no big difference; fixing stuff on master obviously needs a backport patch to beta (which you have already submitted).

In both case they are nominated for backport approval (see docs) and discussed during the weekly T-compiler triage meeting (in ~4 hours from now 🙂 )

@jieyouxu
Copy link
Member

r? compiler (wont get to this soon)

@rustbot rustbot assigned petrochenkov and unassigned jieyouxu Oct 23, 2025
@Noratrieb Noratrieb added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 23, 2025
@Noratrieb
Copy link
Member

I've nominates this one for backport and will close the other PR to follow our standard process of nominating PRs against master and then letting the release team cherry pick approved backports. Thank you for the quick fix!

.char_indices()
.find(|(i, _)| *i >= stripped_bytes)
.map(|(i, _)| i)
.unwrap_or(filename.len());
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that the 5 lines above are equivalent to:

let split_at = filename.ceil_char_boundary(stripped_bytes);

@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Oct 23, 2025

r=me after the comment above is resolved
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 23, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@tardyp tardyp force-pushed the lto_big_filesize_utf8 branch from 96868ac to a968930 Compare October 23, 2025 12:03
@tardyp
Copy link
Contributor Author

tardyp commented Oct 23, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 23, 2025
@tardyp
Copy link
Contributor Author

tardyp commented Oct 23, 2025

@thanks @JonathanBrouwer for the thoughtful suggestion on this recently out of nightly api.

Note that I took the opportunity of this rework to replace the boring "28_找出字符串中第一个匹配项的下标" by more entertaining "ⴻⵎⵎⴻⵎ_ⴷⵉⵎⴰ_ⵖⴻⴼ_ⵢⵉⵙⴻⴽⴽⵉⵍⴻⵏ_ⵏ_ⵡⴰⵟⴰⵙ_ⵏ_ⵢⵉⴱⵢⵜⴻⵏ" which more adequately watches for multi byte character issues.

@JonathanBrouwer
Copy link
Contributor

Thank you so much for the quick fix!
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 23, 2025

📌 Commit a968930 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2025
@JonathanBrouwer
Copy link
Contributor

@bors try cancel
Apparently quoting the arguments doesn't work :c

@rust-bors
Copy link

rust-bors bot commented Oct 24, 2025

Try build cancelled. Cancelled workflows:

@JonathanBrouwer
Copy link
Contributor

@bors try jobs=x86_64-mingw-,i686-msvc-

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 24, 2025
fix panic when rustc tries to reduce intermediate filenames len with utf8

try-job: x86_64-mingw-*
try-job: i686-msvc-*
@tardyp tardyp force-pushed the lto_big_filesize_utf8 branch from 006611b to d73e0b8 Compare October 24, 2025 14:07
@tardyp
Copy link
Contributor Author

tardyp commented Oct 24, 2025

@JonathanBrouwer I forgot the import in my commit from 5min ago. Forced pushed a fix after verifying it actually passes on my system. Will Need another try command.. 🙏

@JonathanBrouwer
Copy link
Contributor

@bors try cancel

@rust-bors
Copy link

rust-bors bot commented Oct 24, 2025

Try build cancelled. Cancelled workflows:

…th multi byte chars

The issue cannot be reproduced with the former testcase of creating external crates because
rust refuses to use "external crate 28_找出字符串中第一个匹配项的下标"
because it is not a valid indentifier (starts with number, and contain non ascii chars)

But still using 28_找出字符串中第一个匹配项的下标.rs as a filename is accepted by previous rustc releases
So we consider it valid, and add an integration test for it to catch any regression on other code related to non ascii filenames.
@tardyp tardyp force-pushed the lto_big_filesize_utf8 branch from d73e0b8 to c6acffe Compare October 24, 2025 14:20
@JonathanBrouwer
Copy link
Contributor

@bors try jobs=x86_64-mingw-,i686-msvc-
Would be really suprised if it fails now but lets run it anyways to be sure.
@tardyp Thanks so much for your quick fixes!

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 24, 2025
fix panic when rustc tries to reduce intermediate filenames len with utf8

try-job: x86_64-mingw-*
try-job: i686-msvc-*
@tardyp
Copy link
Contributor Author

tardyp commented Oct 24, 2025

I'll be in vacation tomorrow for a week, mostly afk, so I wouldn't be able to be so reactive. hopefully we can finish this today!

@rust-bors
Copy link

rust-bors bot commented Oct 24, 2025

☀️ Try build successful (CI)
Build commit: 3634e54 (3634e54c8b3d8bb839bbda831a265ababb9de237, parent: 8aab621cd56bdc704f73c9d9aaa9f35ab5ee55b0)

@cuviper
Copy link
Member

cuviper commented Oct 24, 2025

Let's boost this so we can get to the beta backport too...

@bors r=JonathanBrouwer p=5

@bors
Copy link
Collaborator

bors commented Oct 24, 2025

📌 Commit c6acffe has been approved by JonathanBrouwer

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 24, 2025
@bors
Copy link
Collaborator

bors commented Oct 24, 2025

⌛ Testing commit c6acffe with merge 2aaa62b...

@bors
Copy link
Collaborator

bors commented Oct 24, 2025

☀️ Test successful - checks-actions
Approved by: JonathanBrouwer
Pushing 2aaa62b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 24, 2025
@bors bors merged commit 2aaa62b into rust-lang:master Oct 24, 2025
13 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 24, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing ab92564 (parent) -> 2aaa62b (this PR)

Test differences

Show 6 test diffs

Stage 1

  • [run-make] tests/run-make/lto-long-filenames_cn: [missing] -> pass (J3)

Stage 2

  • [run-make] tests/run-make/lto-long-filenames_cn: [missing] -> ignore (ignored when cross-compiling) (J0)
  • [run-make] tests/run-make/lto-long-filenames_cn: [missing] -> ignore (ignored when the operating system and target environment are windows-gnu) (J1)
  • [run-make] tests/run-make/lto-long-filenames_cn: [missing] -> pass (J2)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 2aaa62b89d22b570e560731b03e3d2d6f5c3bbce --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. pr-check-1: 1500.5s -> 1906.0s (27.0%)
  2. x86_64-gnu-miri: 4103.7s -> 4847.8s (18.1%)
  3. x86_64-rust-for-linux: 2461.8s -> 2903.0s (17.9%)
  4. x86_64-gnu-llvm-20-1: 3296.6s -> 3860.5s (17.1%)
  5. x86_64-gnu-debug: 6137.5s -> 7180.2s (17.0%)
  6. x86_64-gnu-gcc: 3033.5s -> 3525.8s (16.2%)
  7. i686-gnu-2: 5392.9s -> 6243.6s (15.8%)
  8. x86_64-gnu-llvm-20: 2428.1s -> 2808.3s (15.7%)
  9. aarch64-gnu: 6019.0s -> 6857.0s (13.9%)
  10. dist-various-1: 3645.2s -> 4134.8s (13.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs beta-accepted Accepted for backporting to the compiler in the beta channel. beta-nominated Nominated for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

regression: ICE byte index is not a char boundary

10 participants