Commit graph

2501 commits

Author SHA1 Message Date
Ralf Jung
5c33a5690d offset, offset_from: allow zero-byte offset on arbitrary pointers 2024-05-13 07:59:16 +02:00
bors
79a85d4e99 Auto merge of #3598 - RalfJung:heap, r=RalfJung
alloc: update comments around malloc() alignment

Also separate the C heap shims form the Windows heap shims; their guarantees aren't quite the same.
2024-05-11 08:53:42 +00:00
Ralf Jung
01b151ebd4 separate windows heap functions from C heap shims 2024-05-11 10:52:08 +02:00
Ralf Jung
7a0ee91ba5 alloc: update comments around malloc() alignment 2024-05-11 10:52:02 +02:00
The Miri Cronjob Bot
ce3daac283 Merge from rustc 2024-05-11 05:03:34 +00:00
The Miri Cronjob Bot
4d63d0af4d Preparing for merge from rustc 2024-05-11 04:56:14 +00:00
Ralf Jung
25a3b6687e rename 'extern-so' to 'native-lib' 2024-05-10 18:30:48 +02:00
Matthias Krüger
9a9ec90567
Rollup merge of #124957 - compiler-errors:builtin-deref, r=michaelwoerister
Make `Ty::builtin_deref` just return a `Ty`

Nowhere in the compiler are we using the mutability part of the `TyAndMut` that we used to return.
2024-05-10 16:10:47 +02:00
Michael Goulet
d50c2b0a52 Make builtin_deref just return a Ty 2024-05-09 22:55:00 -04:00
Ralf Jung
41d36a0951 interpret/miri: better errors on failing offset_from 2024-05-09 13:09:47 +02:00
bors
d3f4d06c15 Auto merge of #3591 - RalfJung:win-symlink-trouble, r=RalfJung
do not run symlink tests on Windows hosts

Fixes https://github.com/rust-lang/miri/issues/3587
2024-05-09 10:30:11 +00:00
Ralf Jung
1edd3d59b0 do not run symlink tests on Windows hosts 2024-05-09 12:28:53 +02:00
Ralf Jung
cb44843900 make RUSTC_BLESS entirely an internal thing 2024-05-09 11:27:22 +02:00
Ralf Jung
e16f46cdab make MIRI_TEST_TARGET entirely an internal thing 2024-05-09 11:27:22 +02:00
bors
42d9b6890e Auto merge of #3588 - RossSmyth:CliTarget, r=RalfJung
Allow test targets to be set via CLI args

Fixes #3584

I'm not a pro shell script reader as I am a Windows user, but we shall see if the CI script broke.
2024-05-09 07:41:43 +00:00
Ralf Jung
d43cb7121e minor tweaks 2024-05-09 09:40:13 +02:00
Ross Smyth
620bf348e1 Update documentation for miri-script test changes 2024-05-08 18:05:28 -04:00
Ross Smyth
6e564ed9fd Update CI script for the miri-script test changes 2024-05-08 18:05:28 -04:00
Ross Smyth
6580a22726 Allow test targets to be set via CLI args 2024-05-08 18:05:26 -04:00
Matthias Krüger
3e22ea9e2f
Rollup merge of #124876 - nnethercote:rm-use-crate-rustc_foo, r=compiler-errors
Simplify `use crate::rustc_foo::bar` occurrences.

They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)

r? ``@eholk``
2024-05-08 23:33:26 +02:00
bors
2e1d417e70 Auto merge of #3580 - tiif:feat/malloc0-non-null-pointer, r=RalfJung
Implement non-null pointer for malloc(0)

Use non-null pointer for malloc(0) as mentioned in  #3576 to detect leaks and double free of ``malloc(0)`` addresses.
2024-05-08 20:50:38 +00:00
tiif
4ab79e5622 Implement non-null pointer for malloc(0) 2024-05-09 04:34:32 +08:00
Markus Reiter
bd8e565e16
Use generic NonZero. 2024-05-08 21:37:55 +02:00
bors
15305a764d Auto merge of #3589 - RalfJung:io-error, r=RalfJung
io::Error handling: keep around the full io::Error for longer so we can give better errors

This should help with the error message in https://github.com/rust-lang/miri/issues/3587.
2024-05-08 16:23:17 +00:00
Ralf Jung
1601b27d1c io::Error handling: keep around the full io::Error for longer so we can give better errors 2024-05-08 18:03:29 +02:00
Nicholas Nethercote
b68b92041c Simplify use crate::rustc_foo::bar occurrences.
They can just be written as `use rustc_foo::bar`, which is far more
standard. (I didn't even know that a `crate::` prefix was valid.)
2024-05-08 16:57:31 +10:00
Ralf Jung
34f64cddf5 remove problems that I do not think we have seen in a while 2024-05-07 21:50:02 +02:00
Ralf Jung
d2472ba2cb README: update introduction 2024-05-07 21:50:02 +02:00
bors
4d6d9a95f6 Auto merge of #3579 - RalfJung:libc, r=RalfJung
organize libc tests into a proper folder, and run some of them on Windows
2024-05-06 09:28:51 +00:00
Ralf Jung
dd5437fdff organize libc tests into a proper folder, and run some of them on Windows 2024-05-06 11:15:07 +02:00
Asger Hautop Drewsen
43c99160d3 Implement wcslen 2024-05-06 10:54:51 +02:00
bors
e477895aaf Auto merge of #3578 - RalfJung:realloc, r=RalfJung
avoid code duplication between realloc and malloc
2024-05-06 08:06:16 +00:00
Ralf Jung
82e2144ed7 avoid code duplication between realloc and malloc 2024-05-06 09:45:11 +02:00
bors
629d57e700 Auto merge of #3574 - RalfJung:deps, r=RalfJung
reduce test_dependencies

Also add comments for why we need all these 3 random functions for Windows, and the old Linux syscall interface.
2024-05-05 20:45:21 +00:00
Ralf Jung
a5baa150e3 getrandom: test with and without isolation
also add some comments for why we keep certain old obscure APIs supported
2024-05-05 22:41:28 +02:00
Ralf Jung
6a47bd4cf7 remove rand test
the actual target-specific things we want to test are all in getrandom,
and rand already tests miri itself
2024-05-05 22:36:03 +02:00
Ralf Jung
37087dbed7 reduce tokio features 2024-05-05 22:34:53 +02:00
bors
e43458cf06 Auto merge of #3570 - devnexen:solaris_build_fix, r=RalfJung
Solaris: make pre-main code work

Fixes https://github.com/rust-lang/miri/issues/3566
2024-05-05 20:11:17 +00:00
David Carlier
fb84198387 solaris support start. 2024-05-05 21:08:39 +00:00
Ralf Jung
0ca3591a6d unix/fs: a bit of cleanup around host-specific code 2024-05-05 18:49:32 +02:00
bors
19a5d475f2 Auto merge of #3565 - RalfJung:libc, r=RalfJung
re-organize libc tests

And share some more things across unices
2024-05-05 14:07:43 +00:00
Ralf Jung
f3018409fc hello: also ensure stderr works 2024-05-05 15:46:13 +02:00
Ralf Jung
aaf5c5e742 move randomness tests into a single file and share the getrandom implementation across unices 2024-05-05 15:46:12 +02:00
Ralf Jung
352b21033a move things out of libc-misc that have a better home; make libc-misc work on illumos 2024-05-05 15:45:28 +02:00
bors
e1b5e5540f Auto merge of #3569 - RalfJung:cargo-update, r=RalfJung
housekeeping: update dependencies

This also pulls in the new rustc-build-sysroot that hides all the unexpected_cfgs noise.
2024-05-05 13:41:36 +00:00
Ralf Jung
067e33d701 housekeeping: update dependencies 2024-05-05 15:31:13 +02:00
Ralf Jung
5b6df92d54 unix/thread: properly use pthread_t for thread IDs 2024-05-05 15:12:23 +02:00
Ralf Jung
e5597b20c4 sanity-check the pthread offsets against the static initializers 2024-05-05 14:24:21 +02:00
Ralf Jung
ba1a00af15 pthread shims: reorganize field offset handling 2024-05-05 13:35:07 +02:00
David Carlier
b4011a08e8 illumos support. 2024-05-05 12:52:47 +01:00