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

Rollup of 5 pull requests #99412

Closed
wants to merge 14 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

5225225 and others added 14 commits July 3, 2022 10:46
Usually opening a file handle with access set to metadata only will always succeed, even if the file is locked. However some special system files, such as `C:\hiberfil.sys`, are locked by the system in a way that denies even that. So as a fallback we try reading the cached metadata from the directory.
… r=thomcc

Add assertion that `transmute_copy`'s U is not larger than T

This is called out as a safety requirement in the docs, but because knowing this can be done at compile time and constant folded (just like the `align_of` branch is removed), we can just panic here.

I've looked at the asm (using `cargo-asm`) of a function that both is correct and incorrect, and the panic is completely removed, or is unconditional, without needing build-std.

I don't expect this to cause much breakage in the wild. I scanned through https://miri.saethlin.dev/ub for issues that would look like this (error: Undefined Behavior: memory access failed: alloc1768 has size 1, so pointer to 8 bytes starting at offset 0 is out-of-bounds), but couldn't find any.

That doesn't rule out it happening in crates tested that fail earlier for some other reason, though, but it indicates that doing this is rare, if it happens at all. A crater run for this would need to be build and test, since this is a runtime thing.

Also added a few more transmute_copy tests.
Windows: Use `FindFirstFileW` for getting the metadata of locked system files

Fixes rust-lang#96980

Usually opening a file handle with access set to metadata only will always succeed, even if the file is locked. However some special system files, such as `C:\hiberfil.sys`, are locked by the system in a way that denies even that. So as a fallback we try reading the cached metadata from the directory.

Note that the test is a bit iffy. I don't know if `hiberfil.sys` actually exists in the CI.

r? rust-lang/libs
add missing null ptr check in alloc example

`alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
…r=oli-obk

Do not allow typeck children items to constrain outer RPITs

Fixes rust-lang#99073 in a simpler and more conservative way than rust-lang#99079. Simply raise a mismatched types error if we try to constrain an RPIT in an item that isn't the RPIT's parent.

r? `@oli-obk`
interpret/visitor: add missing early return

I forgot to add this when adding the special `Box` handling branch.

r? ``@oli-obk``
@rustbot rustbot added 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. rollup A PR which is a rollup labels Jul 18, 2022
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 18, 2022

📌 Commit 0f29bef has been approved by Dylan-DPC

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 18, 2022
@bors
Copy link
Contributor

bors commented Jul 18, 2022

⌛ Testing commit 0f29bef with merge da09b8cb29e53a24470af42d9d087ec506448127...

@bors
Copy link
Contributor

bors commented Jul 18, 2022

💔 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 Jul 18, 2022
@Dylan-DPC
Copy link
Member Author

@bors retry spurious

@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 Jul 18, 2022
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Jul 18, 2022

⌛ Testing commit 0f29bef with merge ad1c57613a24cbbe94f0bc1f41ef5976a30bde24...

@bors
Copy link
Contributor

bors commented Jul 18, 2022

💔 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 Jul 18, 2022
@ChrisDenton
Copy link
Member

Caused by #98916

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
test fs::tests::file_test_io_seek_and_write ... ok
test fs::tests::file_test_io_seek_read_write ... ok
test fs::tests::file_test_iounlinking_invalid_path_should_raise_condition ... ok
test fs::tests::file_test_io_seek_shakedown ... ok
test fs::tests::hiberfil_sys ... FAILED
test fs::tests::file_test_io_smoke_test ... ok
test fs::tests::file_try_clone ... ok
test fs::tests::invalid_path_raises ... ok
test fs::tests::file_test_stat_is_correct_on_is_file ... ok
---
test fs::tests::read_large_dir ... ok

failures:

---- fs::tests::hiberfil_sys stdout ----
thread 'fs::tests::hiberfil_sys' panicked at 'assertion failed: `(left == right)`
  left: `true`,
 right: `false`', library\std\src\fs\tests.rs:1546:5

failures:
failures:
    fs::tests::hiberfil_sys
test result: FAILED. 902 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 74.60s


error: test failed, to rerun pass '-p std --lib'
Build completed unsuccessfully in 0:46:44
Build completed unsuccessfully in 0:46:44
make: *** [Makefile:70: ci-subset-1] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants