Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const-eval: do not make UbChecks behavior depend on current crate's flags #129608

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

RalfJung
Copy link
Member

Fixes #129552

Let's see if we can get away with just always enabling these checks.

@rustbot
Copy link
Collaborator

rustbot commented Aug 26, 2024

r? @nnethercote

rustbot has assigned @nnethercote.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 26, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

The Miri subtree was changed

cc @rust-lang/miri

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 26, 2024
@RalfJung
Copy link
Member Author

r? @saethlin

@bors try
@rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 26, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2024
const-eval: do not make UbChecks behavior depend on current crate's flags

Fixes rust-lang#129552

Let's see if we can get away with just always enabling these checks.
@bors
Copy link
Contributor

bors commented Aug 26, 2024

⌛ Trying commit d312fdc with merge b7fca3a...

@RalfJung RalfJung force-pushed the const-eval-ub-checks branch from d312fdc to 7ea2981 Compare August 26, 2024 11:56
@RalfJung
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Aug 26, 2024

⌛ Trying commit 7ea2981 with merge ed16544...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2024
const-eval: do not make UbChecks behavior depend on current crate's flags

Fixes rust-lang#129552

Let's see if we can get away with just always enabling these checks.
@bors
Copy link
Contributor

bors commented Aug 26, 2024

☀️ Try build successful - checks-actions
Build commit: ed16544 (ed16544c35681a57b2a2f1a4fd440aeb7cd1bda2)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ed16544): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results (primary -2.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Cycles

Results (secondary 2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

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

Bootstrap: 752.172s -> 752.137s (-0.00%)
Artifact size: 338.71 MiB -> 338.77 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 26, 2024
@RalfJung
Copy link
Member Author

Interesting, that's not even the ctfe stress test. It's also barely significant so I think we can ignore it.

@saethlin
Copy link
Member

I'm not surprised we get away with no perf hit; unsafe const code is pretty rare to begin with.

And the one regression has a significance factor of 1.15x so there's a fair chance it's spurious.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 26, 2024

📌 Commit 7ea2981 has been approved by saethlin

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 Aug 26, 2024
@bors
Copy link
Contributor

bors commented Aug 28, 2024

⌛ Testing commit 7ea2981 with merge 9bc5ef2...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 28, 2024
…thlin

const-eval: do not make UbChecks behavior depend on current crate's flags

Fixes rust-lang#129552

Let's see if we can get away with just always enabling these checks.
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustdoc test:false 58.011
[RUSTC-TIMING] rustdoc_tool_binary test:false 0.801
    Finished `release` profile [optimized] target(s) in 0.43s
thread 'main' panicked at src/lib.rs:1690:17:
failed to copy `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\rustdoc_tool_binary.exe` to `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1\bin\rustdoc.exe`: The process cannot access the file because it is being used by another process. (os error 32)
##[endgroup]
Build completed unsuccessfully in 0:00:10
  local time: Wed, Aug 28, 2024 10:36:14 AM
  network time: Wed, 28 Aug 2024 10:36:15 GMT

@bors
Copy link
Contributor

bors commented Aug 28, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 28, 2024
@RalfJung
Copy link
Member Author

@bors retry failed to copy C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage0-tools\x86_64-pc-windows-msvc\release\rustdoc_tool_binary.exe to C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1\bin\rustdoc.exe: The process cannot access the file because it is being used by another process. (os error 32)
Cc #127883

@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 Aug 28, 2024
@saethlin
Copy link
Member

@bors retry

@saethlin
Copy link
Member

@bors rollup=iffy

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 28, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#129421 (add repr to the allowlist for naked functions)
 - rust-lang#129480 (docs: correct panic conditions for rem_euclid and similar functions)
 - rust-lang#129551 (ub_checks intrinsics: fall back to cfg(ub_checks))
 - rust-lang#129608 (const-eval: do not make UbChecks behavior depend on current crate's flags)
 - rust-lang#129613 (interpret: do not make const-eval query result depend on tcx.sess)
 - rust-lang#129641 (rustdoc: fix missing resource suffix on `crates.js`)
 - rust-lang#129657 (Rename `BikeshedIntrinsicFrom` to `TransmuteFrom`)
 - rust-lang#129666 (interpret: add missing alignment check in raw_eq)
 - rust-lang#129667 (Rustc driver cleanup)
 - rust-lang#129668 (Fix Pin::set bounds regression)
 - rust-lang#129686 (coverage: Rename `CodeRegion` to `SourceRegion`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 28, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#129421 (add repr to the allowlist for naked functions)
 - rust-lang#129480 (docs: correct panic conditions for rem_euclid and similar functions)
 - rust-lang#129551 (ub_checks intrinsics: fall back to cfg(ub_checks))
 - rust-lang#129608 (const-eval: do not make UbChecks behavior depend on current crate's flags)
 - rust-lang#129613 (interpret: do not make const-eval query result depend on tcx.sess)
 - rust-lang#129641 (rustdoc: fix missing resource suffix on `crates.js`)
 - rust-lang#129657 (Rename `BikeshedIntrinsicFrom` to `TransmuteFrom`)
 - rust-lang#129666 (interpret: add missing alignment check in raw_eq)
 - rust-lang#129667 (Rustc driver cleanup)
 - rust-lang#129668 (Fix Pin::set bounds regression)
 - rust-lang#129686 (coverage: Rename `CodeRegion` to `SourceRegion`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3456b1d into rust-lang:master Aug 28, 2024
6 of 7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 28, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 28, 2024
Rollup merge of rust-lang#129608 - RalfJung:const-eval-ub-checks, r=saethlin

const-eval: do not make UbChecks behavior depend on current crate's flags

Fixes rust-lang#129552

Let's see if we can get away with just always enabling these checks.
@RalfJung RalfJung deleted the const-eval-ub-checks branch August 29, 2024 06:43
@jieyouxu jieyouxu added the CI-spurious-fail-msvc CI spurious failure: target env msvc label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-spurious-fail-msvc CI spurious failure: target env msvc 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.

Compile-time semantics of ub_checks intrinsic are unsound
8 participants