Skip to content

Conversation

@RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 29, 2025

The pointer fragment support from #144081 got disabled due to #146291. This brings it back. To fix the issue, the per-byte provenance fragment tracking tracks both the provenance and raw address of the full pointer, so we can ensure that only fragments that are truly part of the same pointer are being merged.

r? @oli-obk
Cc @theemathas
Fixes rust-lang/const-eval#72 again.
Also fixes #147959.

@traviscross I assume this won't need another t-lang FCP since it already got FCP'd in #144081?

@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2025

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

The Miri subtree was changed

cc @rust-lang/miri

@rustbot rustbot added 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 29, 2025

oli-obk is not on the review rotation at the moment.
They may take a while to respond.

@traviscross
Copy link
Contributor

traviscross commented Oct 29, 2025

I assume this won't need another t-lang FCP since it already got FCP'd in #144081?

As I commented a moment ago on an unrelated matter in #145954 (comment):

As a procedural matter, though the FCP in ... did originally cover what's here, the fact that it was merged without that puts the ball back in our court, in the same way that if one of our stabilizations is reverted, we then need to re-FCP the restabilization. In this way, our FCPs represent a "point-in-time" decision to stabilize something.

We discussed that procedural analysis in the meeting and it seemed right to people.

In that light, we would FCP the restabilization here. It should be an easy call for us given the earlier decision.

@RalfJung RalfJung added I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination labels Oct 29, 2025
@traviscross traviscross added T-lang Relevant to the language team needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 29, 2025
@traviscross
Copy link
Contributor

This seems right to me. I propose we restabilize this.

@rfcbot fcp merge

@rust-rfcbot
Copy link
Collaborator

rust-rfcbot commented Oct 29, 2025

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 29, 2025
@traviscross traviscross added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 29, 2025
@RalfJung RalfJung force-pushed the const-ptr-fragment branch 2 times, most recently from 4e023d0 to 739d035 Compare October 29, 2025 19:38
fn get_alloc_id(self) -> Option<AllocId>;

/// Defines the 'join' of provenance: what happens when doing a pointer load and different bytes have different provenance.
fn join(left: Self, right: Self) -> Option<Self>;
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm getting rid of the join function because the code that used it anyway had to special-case wildcards, and then it became easier to just have the entire wildcard logic there rather than having some of it inside join.

@theemathas
Copy link
Contributor

Do we need tests for #147959?

@RalfJung
Copy link
Member Author

Do we need tests for #147959?

Good point, I added that.

Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

r=me with FCP finished

View changes since this review

@traviscross traviscross removed I-lang-nominated Nominated for discussion during a lang team meeting. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Nov 6, 2025
@RalfJung
Copy link
Member Author

RalfJung commented Nov 8, 2025

@oli-obk I have added a commit to reduce the impact of #148470, so this needs another review I am afraid.

@RalfJung RalfJung added the S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. label Nov 8, 2025
@RalfJung
Copy link
Member Author

RalfJung commented Nov 8, 2025

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 8, 2025
const-eval: fix and re-enable pointer fragment support
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 8, 2025
@rust-bors
Copy link

rust-bors bot commented Nov 8, 2025

☀️ Try build successful (CI)
Build commit: 4c5660e (4c5660ea2a32ea020121eb500fe05792d673a4d4, parent: bbb6f68e2888eea989337d558b47372ecf110e08)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4c5660e): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.1% [0.1%, 0.1%] 1
Regressions ❌
(secondary)
1.2% [0.8%, 1.6%] 10
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.1%, 0.1%] 1

Max RSS (memory usage)

Results (secondary 3.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [2.2%, 4.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-4.8%, -2.1%] 4
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 474.693s -> 477.255s (0.54%)
Artifact size: 390.92 MiB -> 391.03 MiB (0.03%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 8, 2025
@RalfJung
Copy link
Member Author

RalfJung commented Nov 9, 2025

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 9, 2025
const-eval: fix and re-enable pointer fragment support
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 9, 2025
@rust-bors
Copy link

rust-bors bot commented Nov 9, 2025

☀️ Try build successful (CI)
Build commit: 2b58ae9 (2b58ae9fcb18e5e96469f20532bc824b8af6dfac, parent: acda5e9f9aadac705b851935b14aa3d34a67d428)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2b58ae9): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 0.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.6% [0.6%, 0.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.6%, 0.6%] 1

Cycles

Results (secondary -3.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 474.157s -> 476.71s (0.54%)
Artifact size: 390.96 MiB -> 391.05 MiB (0.02%)

@rustbot rustbot removed perf-regression Performance regression. S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. 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. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consteval pointer fragment support was not properly disabled. Full support for pointer fragments

9 participants