Skip to content

Conversation

@Urgau
Copy link
Member

@Urgau Urgau commented Dec 15, 2025

Like debuginfo, coverage artifacts should use the embeddable path (aka absolute path).

Unfortunately due to coverage-run and compiletest, I'm unable to create a reproducer in our test-suite, but when manually invoking rustc with the reproducer (#150020 (comment)) I think the issue is fixed.

Fixes #150020
r? Zalathar

@rustbot
Copy link
Collaborator

rustbot commented Dec 15, 2025

Some changes occurred in coverage instrumentation.

cc @Zalathar

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Dec 15, 2025
@Zalathar
Copy link
Member

I don't love the extra complexity here, since compiler path handling is already mysterious to me, but given the regression I'm OK with taking this as a spot fix for now.

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 16, 2025

📌 Commit f05ed90 has been approved by Zalathar

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 Dec 16, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 16, 2025
…=Zalathar

Use the embeddable filename for coverage artifacts

Like debuginfo, coverage artifacts should use the embeddable path (aka absolute path).

Unfortunately due to `coverage-run` and `compiletest`, I'm unable to create a reproducer in our test-suite, but when manually invoking `rustc` with the reproducer (rust-lang#150020 (comment)) I think the issue is fixed.

Fixes rust-lang#150020
r? Zalathar
@jieyouxu
Copy link
Member

Unfortunately due to coverage-run and compiletest, I'm unable to create a reproducer in our test-suite, but when manually invoking rustc with the reproducer

Would a run-make test be able to help you out here?

bors added a commit that referenced this pull request Dec 16, 2025
Rollup of 14 pull requests

Successful merges:

 - #148756 (Warn on codegen attributes on required trait methods)
 - #148790 (Add new Tier-3 target: riscv64im-unknown-none-elf)
 - #149271 (feat: dlopen Enzyme)
 - #149459 (std: sys: fs: uefi: Implement set_times and set_perm)
 - #149771 (bootstrap readme: make easy to read when editor wrapping is not enabled)
 - #149856 (Provide an extended framework for type visit, for use in rust-analyzer)
 - #149950 (Simplify how inline asm handles `MaybeUninit`)
 - #150014 (Metadata loader cleanups)
 - #150021 (document that mpmc channels deliver an item to (at most) one receiver)
 - #150022 (Generate macro expansion for rust compiler crates docs)
 - #150029 (Update books)
 - #150031 (assert impossible branch is impossible)
 - #150034 (do not add `I-prioritize` when `F-*` labels are present)
 - #150036 (Use the embeddable filename for coverage artifacts)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Dec 16, 2025
Rollup of 13 pull requests

Successful merges:

 - #148756 (Warn on codegen attributes on required trait methods)
 - #148790 (Add new Tier-3 target: riscv64im-unknown-none-elf)
 - #149271 (feat: dlopen Enzyme)
 - #149459 (std: sys: fs: uefi: Implement set_times and set_perm)
 - #149771 (bootstrap readme: make easy to read when editor wrapping is not enabled)
 - #149856 (Provide an extended framework for type visit, for use in rust-analyzer)
 - #149950 (Simplify how inline asm handles `MaybeUninit`)
 - #150014 (Metadata loader cleanups)
 - #150021 (document that mpmc channels deliver an item to (at most) one receiver)
 - #150029 (Update books)
 - #150031 (assert impossible branch is impossible)
 - #150034 (do not add `I-prioritize` when `F-*` labels are present)
 - #150036 (Use the embeddable filename for coverage artifacts)

r? `@ghost`
`@rustbot` modify labels: rollup
@Urgau
Copy link
Member Author

Urgau commented Dec 16, 2025

I don't love the extra complexity here, since compiler path handling is already mysterious to me, but given the regression I'm OK with taking this as a spot fix for now.

I did this way since we already do it this way for the metadata, but I agree, this feels like implementation detail. We can probably add a helper function on FileName directly to simplify this pattern.

@Urgau
Copy link
Member Author

Urgau commented Dec 16, 2025

Unfortunately due to coverage-run and compiletest, I'm unable to create a reproducer in our test-suite, but when manually invoking rustc with the reproducer

Would a run-make test be able to help you out here?

I don't know, can run-make test invoke the coverage-dump tool?

@jieyouxu
Copy link
Member

Ah, right, that would be tricky (ATM the answer is "no"). Please disregard.

@bors bors merged commit f9d6cb5 into rust-lang:main Dec 16, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Dec 16, 2025
Rollup merge of #150036 - Urgau:filenames-coverage-150020, r=Zalathar

Use the embeddable filename for coverage artifacts

Like debuginfo, coverage artifacts should use the embeddable path (aka absolute path).

Unfortunately due to `coverage-run` and `compiletest`, I'm unable to create a reproducer in our test-suite, but when manually invoking `rustc` with the reproducer (#150020 (comment)) I think the issue is fixed.

Fixes #150020
r? Zalathar
@rustbot rustbot added this to the 1.94.0 milestone Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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.

nightly regression: coverage contains bad paths

5 participants