Commit graph

2938 commits

Author SHA1 Message Date
Ralf Jung
17cfbc6fa3 FD: remove big surrounding RefCell, simplify socketpair 2024-08-16 16:18:59 +02:00
bors
86783bef33 Auto merge of #3712 - tiif:feat/epoll, r=oli-obk
Implement epoll shim

This PR:
- implemented non-blocking ``epoll`` for #3448 . The design for this PR is documented in https://hackmd.io/`@tiif/SJatftrH0` .
- renamed FileDescriptor to FileDescriptionRef
- assigned an ID to every file description
2024-08-14 13:12:51 +00:00
tiif
607c4f5184 Implement epoll shim 2024-08-14 18:45:29 +08:00
Ralf Jung
db3f92144d CI: need nightly toolchain for auto-rustup PR 2024-08-14 07:47:24 +02:00
Ralf Jung
c96493829b fmt 2024-08-14 07:46:54 +02:00
Ralf Jung
b65cdffbe4 Merge from rustc 2024-08-14 07:43:52 +02:00
Ralf Jung
ef91e65644 Preparing for merge from rustc 2024-08-14 07:43:43 +02:00
bors
6ff09af0cd Auto merge of #3802 - RalfJung:no-more-call-id, r=RalfJung
Borrow tracking: remove the concept of a call ID

Turns out this is not needed any more ever since we started tracking the `protected_tags` list in the per-frame state.

Also thanks to `@JoJoDeveloping` for inspiring me to even consider this possibility. :)
2024-08-13 17:48:58 +00:00
Ralf Jung
7db942b320 remove the concept of a Call ID 2024-08-13 19:47:28 +02:00
Ralf Jung
10cb5aa934 borrow_tracker: update comments regarding protectors 2024-08-13 13:51:08 +02:00
bors
591ecb88df Auto merge of #128742 - RalfJung:miri-vtable-uniqueness, r=saethlin
miri: make vtable addresses not globally unique

Miri currently gives vtables a unique global address. That's not actually matching reality though. So this PR enables Miri to generate different addresses for the same type-trait pair.

To avoid generating an unbounded number of `AllocId` (and consuming unbounded amounts of memory), we use the "salt" technique that we also already use for giving constants non-unique addresses: the cache is keyed on a "salt" value n top of the actually relevant key, and Miri picks a random salt (currently in the range `0..16`) each time it needs to choose an `AllocId` for one of these globals -- that means we'll get up to 16 different addresses for each vtable. The salt scheme is integrated into the global allocation deduplication logic in `tcx`, and also used for functions and string literals. (So this also fixes the problem that casting the same function to a fn ptr over and over will consume unbounded memory.)

r? `@saethlin`
Fixes https://github.com/rust-lang/miri/issues/3737
2024-08-13 04:32:34 +00:00
bors
dd600eff3a Auto merge of #3798 - RalfJung:miri-script-remap-path-prefix, r=saethlin
miri-script: use --remap-path-prefix to print errors relative to the right root

Inspired by https://github.com/rust-lang/rust-clippy/pull/13232, this makes it so that when cargo-miri fails to build, `./miri check` will print errors with paths like `cargo-miri/src/setup.rs`. That means we can get rid of the miri-symlink-hacks and instead tell RA to just always invoke the `./miri clippy` script just once, in the root.

This means that we can no longer share a target dir between cargo-miri and miri as the RUSTFLAGS are different to crates that are shared in the dependency tree need to be built twice with two different flags. `miri-script` hence now has to set the MIRI environment variable to tell the `cargo miri setup` invocation where to find Miri.

I also made it so that errors in miri-script itself are properly shown in RA, for which the `./miri` shell wrapper needs to set the right flags.
2024-08-12 08:58:03 +00:00
Ralf Jung
14f9284ebe fix tree borrows Unique test 2024-08-12 10:24:02 +02:00
Ralf Jung
7383401e08 clippy fix 2024-08-12 10:11:39 +02:00
Ralf Jung
c0c6f28cd6 Merge from rustc 2024-08-12 10:08:04 +02:00
Ralf Jung
3652011f54 Preparing for merge from rustc 2024-08-12 10:07:58 +02:00
Ralf Jung
2b83935192 josh-proxy: fix wait-for-josh logic 2024-08-12 10:07:53 +02:00
bors
13f8a57cfb Auto merge of #126793 - saethlin:mono-rawvec, r=scottmcm
Apply "polymorphization at home" to RawVec

The idea here is to move all the logic in RawVec into functions with explicit size and alignment parameters. This should eliminate all the fussing about how tweaking RawVec code produces large swings in compile times.

This uncovered https://github.com/rust-lang/rust-clippy/issues/12979, so I've modified the relevant test in a way that tries to preserve the spirit of the test without tripping the ICE.
2024-08-12 01:47:06 +00:00
Matthias Krüger
bd7075c69e
Rollup merge of #128592 - evelynharthbrooke:master, r=Mark-Simulacrum
Promote aarch64-apple-darwin to Tier 1

This promotes aarch64-apple-darwin to Tier 1 status as per rust-lang/rfcs#3671 and tracking issue #73908. Not sure what else is necessary for this to impement the aforementioned RFC, however I figured I'd try. I did read in previous issues and PRs that the necessary infrastructure was already in place for the aarch64-apple-darwin target, and the RFC mentions the same. So this should be all thats necessary in order for the target to be promoted.

This is a recreation of my previous PR because I accidentally did an incorrect git rebase which caused unnecessary changes to various commit SHAs. So this PR is a recreation of my previous PR without said stumble. My bad.
2024-08-11 07:51:51 +02:00
bors
3456432db1 Auto merge of #3799 - RalfJung:josh-wait, r=RalfJung
josh: wait until the socket is ready
2024-08-10 12:38:57 +00:00
Ralf Jung
1156d585d7 josh: wait until the socket is ready 2024-08-10 14:37:41 +02:00
Ralf Jung
feab324085 CI: we now need the nightly toolchain as well 2024-08-10 13:07:12 +02:00
Ralf Jung
8197f07e0e miri-script: pass around the relative crate dir, not the absolute path to the toml file 2024-08-10 12:59:18 +02:00
Ralf Jung
118be4182c add './miri doc' command 2024-08-10 12:59:18 +02:00
Ralf Jung
d2e0970bde update suggested RA config; the './miri cargo' command is not needed any more 2024-08-10 12:59:18 +02:00
Ralf Jung
f7c938aaf0 miri-script: use --remap-path-prefix to print errors relative to the right root 2024-08-10 12:59:18 +02:00
Nadrieril
e77612d3e4 Fixes in various places 2024-08-10 12:08:46 +02:00
bors
bb04eab4f1 Auto merge of #3795 - tiif:ice-layout-limit, r=RalfJung
throw_unsup_format for alignment greater than 2^29

Fixes #3687
2024-08-10 10:08:06 +00:00
Ben Kimock
b44b367232 Add a FIXME to the changed Miri test 2024-08-09 20:06:27 -04:00
Ben Kimock
d5b55436e9 Bless Miri 2024-08-09 20:06:27 -04:00
Ralf Jung
dec5b463fb do not make function addresses unique with cross_crate_inline_threshold=always (even if that breaks backtraces) 2024-08-09 11:08:08 +02:00
Ralf Jung
dc54f1dccd miri_print_borrow_state: show error when AllocId is invalid 2024-08-09 10:54:07 +02:00
tiif
6552a82166 throw_unsup_format for alignment greater than 2^29 and refactor non-power-of-two alignment check 2024-08-09 12:16:47 +08:00
Zachary S
21f91750ab Don't panic on miri_print_borrow_state() under -Zmiri-disable-stacked-borrows. 2024-08-08 21:06:12 -05:00
Ralf Jung
d4809545ee allow all code to call getuid() 2024-08-07 15:26:59 +02:00
bors
2f405ebc45 Auto merge of #3747 - RalfJung:sse-cleanup, r=RalfJung
remove some SSE/SSE2 intrinsics that are no longer used by stdarch

Fixes https://github.com/rust-lang/miri/issues/3691
2024-08-07 09:53:36 +00:00
Ralf Jung
deeccf9d3e remove some SSE/SSE2 intrinsics that are no longer used by stdarch 2024-08-07 11:36:43 +02:00
The Miri Cronjob Bot
630ad88772 Merge from rustc 2024-08-07 05:04:50 +00:00
The Miri Cronjob Bot
0475bddae2 Preparing for merge from rustc 2024-08-07 04:57:07 +00:00
Ralf Jung
5cab8ae4a4 miri: make vtable addresses not globally unique 2024-08-06 19:09:31 +02:00
Ralf Jung
5783e73f46 make some Frame fields more private 2024-08-06 11:08:14 +02:00
Ralf Jung
522af10ccc interpret: refactor function call handling to be better-abstracted 2024-08-06 11:08:12 +02:00
bors
c755314d78 Auto merge of #3792 - RalfJung:test-typo, r=RalfJung
add and fix return-place-protection tests
2024-08-06 09:03:03 +00:00
Ralf Jung
7d066c4edd add return-place-protection tail-call test, and fix previous test 2024-08-06 11:00:18 +02:00
The Miri Cronjob Bot
ac3e349110 Merge from rustc 2024-08-06 05:05:14 +00:00
The Miri Cronjob Bot
2431949e2a Preparing for merge from rustc 2024-08-06 04:57:39 +00:00
bors
b586701f78 Auto merge of #128707 - matthiaskrgr:rollup-63klywk, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #122049 (Promote riscv64gc-unknown-linux-musl to tier 2)
 - #128580 (Use `ParamEnv::reveal_all` in CFI)
 - #128688 (custom MIR: add support for tail calls)
 - #128694 (Normalize when equating `dyn` tails in MIR borrowck)
 - #128697 (interpret: move nullary-op evaluation into operator.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-05 22:53:14 +00:00
Ralf Jung
46896d6f66 interpret: move nullary-op evaluation into operator.rs 2024-08-05 22:42:34 +02:00
bors
a554f4d715 Auto merge of #3789 - RalfJung:deps, r=RalfJung
bump dependencies

In particular pick up https://github.com/RalfJung/rustc-build-sysroot/pull/22 to fix the fallout from https://github.com/rust-lang/rust/pull/128534.
2024-08-05 17:54:48 +00:00
Ralf Jung
014fdb56b4 bump dependencies 2024-08-05 19:29:37 +02:00