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 #99407

Closed
wants to merge 13 commits into from
Closed

Commits on Jul 3, 2022

  1. Configuration menu
    Copy the full SHA
    5f5ca88 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2022

  1. Configuration menu
    Copy the full SHA
    13ab796 View commit details
    Browse the repository at this point in the history
  2. Windows: Use FindFirstFileW if metadata fails

    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.
    ChrisDenton committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    8d4adad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d06504 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5f5bcb3 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

  1. Configuration menu
    Copy the full SHA
    080a53a View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2022

  1. Configuration menu
    Copy the full SHA
    b631983 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2022

  1. Configuration menu
    Copy the full SHA
    e6be52b View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2022

  1. Rollup merge of rust-lang#98839 - 5225225:assert_transmute_copy_size,…

    … 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.
    Dylan-DPC committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    5be2a2a View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#98916 - ChrisDenton:hiberfil.sys, r=thomcc

    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
    Dylan-DPC committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    3841b58 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#99198 - RalfJung:alloc-null-ptr, r=JohnTitor

    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`.
    Dylan-DPC committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    dea8be9 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#99347 - compiler-errors:opaque-type-key-loc…

    …al-def-id, r=oli-obk
    
    Use `LocalDefId` in `OpaqueTypeKey`
    
    Addresses a `// FIXME(oli-obk): make this a LocalDefId`
    
    r? ```@oli-obk```
    Dylan-DPC committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    a4c47bd View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#99378 - RalfJung:box-early-return, r=oli-obk

    interpret/visitor: add missing early return
    
    I forgot to add this when adding the special `Box` handling branch.
    
    r? `@oli-obk`
    Dylan-DPC committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    54c6c97 View commit details
    Browse the repository at this point in the history