instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
rust-lang__git2-rs__603
rust-lang/git2-rs
603
defect
a9d86f47021886147d46e2a8d9248f94edc45321
46abe34eb96a712b2ad601eda37f45f66f90f488
More Better Worktree Support
#404 has been draft for a while. Since @mkeeler said 'Feel free to take it over'([comment](https://github.com/rust-lang/git2-rs/pull/404#issuecomment-568784984)), I've appended some commits after it. I've intentionally not cleaned commits to preserve history and intensions. I'll clean up the history as it get reviewed...
diff --git a/Cargo.toml b/Cargo.toml index 6620bfd2c8..b7a92851b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,7 @@ structopt = "0.3" time = "0.1.39" tempfile = "3.1.0" thread-id = "3.3.0" # remove when we work with minimal-versions without it +paste = "0.1.12" [features] unstable = [] diff --git a/libg...
19
17
4
[{"id": "G0", "claim": "The WorktreeAddOptions doc comment wrongly says the options configure 'how a repository is initialized' and should say 'how a worktree is initialized'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `Worktree::name` doc...
null
rust-lang__gll__100
rust-lang/gll
100
defect
2b8c5f678cb3d37ee2b1a879f955ff0db1254b03
0f0b5353f70887e360e757ca255c21b8ab5b1bf5
Apply `#![deny(rust_2018_idioms]` to all crate roots
Builds on https://github.com/rust-lang/gll/pull/99
diff --git a/src/generate/rust.rs b/src/generate/rust.rs index 66b9f01..b3863c1 100644 --- a/src/generate/rust.rs +++ b/src/generate/rust.rs @@ -64,20 +64,18 @@ impl<Pat: PartialEq> RuleWithNamedFields<Pat> { .collect(); for (field, paths) in &self.fields { for path in pat...
1
1
1
[{"id": "G0", "claim": "The removal of the `'i: 'a` bound seems to be missing from the generated enum and struct declarations in src/generate/rust.rs and from `Handle` in src/generate/templates/header.rs — this PR dropped `I: 'a` from those definitions but left `'i: 'a` in place.", "category": "correctness", "verdict":...
null
rust-lang__gll__138
rust-lang/gll
138
defect
0a877a4bec2dcf6c122586f939e1b234898a876a
bfc199910f1655df8a2ee62ce839cf5ac063c7e0
generate: support nested records.
*Based on #137.* Implements, i.e. closes #128, and uses "anonymous" records for field substructure.
diff --git a/Cargo.toml b/Cargo.toml index e9d6848..cad0ca6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ doctest = false test = false [patch.'crates-io'] -grammer = { git = "https://github.com/lykenware/grammer", rev = "5bb946aaa198b9c16d1a3a00545c643dcc04bed6" } +grammer = { git = "https://github.com...
2
1
0
[{"id": "G0", "claim": "The record generation should avoid `.collect::<Vec<_>>()` on the field identifiers — at minimum by cloning the iterator, or by using a `quote` version that handles iterators better.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim...
null
rust-lang__hashbrown__365
rust-lang/hashbrown
365
defect
c0247fad35b6d7ed3eb923d3dfef9b888f7b8b2f
6a98adfa8881a8991a0155372cba15d753c9e837
Document `bucket`
Well, I tried to make documentation for the `bucket`, and tried to do it correctly. But maybe I missed something. You can freely edit, add or even throw everything out if necessary :slightly_smiling_face:.
diff --git a/src/map.rs b/src/map.rs index 5e039e2392..fd39f1e02a 100644 --- a/src/map.rs +++ b/src/map.rs @@ -7533,6 +7533,7 @@ mod test_map { } #[test] + #[allow(clippy::needless_borrow)] fn test_extend_ref_kv_tuple() { use std::ops::AddAssign; let mut a = HashMap::new(); diff --...
2
2
0
[{"id": "G0", "claim": "The documentation added for Bucket (the from_base_index safety docs, the ASCII-art pointer diagrams and the other new doc comments in src/raw/mod.rs) contains grammar and spelling errors — e.g. 'Create' for 'Creates', 'calculation the' for 'calculating the', 'a `index`' for 'an `index`', 'than' ...
null
rust-lang__hashbrown__379
rust-lang/hashbrown
379
defect
c93ef8f44162d7478e3430d3b650dcd0a7a0b038
ce8bf812a12e518795cbe8241e975faf16e93684
Fix RawTable::allocation_info for empty table
Fixes #376
diff --git a/src/raw/mod.rs b/src/raw/mod.rs index 63f97cffb8..00ef0b2d2f 100644 --- a/src/raw/mod.rs +++ b/src/raw/mod.rs @@ -531,7 +531,12 @@ impl<T, A: Allocator + Clone> RawTable<T, A> { #[inline] #[cfg(feature = "raw")] pub fn allocation_info(&self) -> (NonNull<u8>, Layout) { - self.table.all...
1
1
0
[{"id": "G0", "claim": "The empty-table check the PR adds inside `RawTable::allocation_info` should be moved down into a method in `RawTableInner`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__hashbrown__684
rust-lang/hashbrown
684
defect
9641fb3eea9a07933fb631da6e4f5070d2f7e1da
f4173c7ac372e31d9d11f75e4f6e96878cb13087
Replace lazy_static with LazyLock
Since Rust 1.80 `LazyLock` was stabilized. In some cases we can just use static slices.
diff --git a/Cargo.toml b/Cargo.toml index e116d894b3..b64f250b99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,6 @@ equivalent = { version = "1.0", optional = true, default-features = false } serde = { version = "1.0.220", default-features = false, optional = true } [dev-dependencies] -lazy_static = "1.4" ...
2
1
0
[{"id": "G0", "claim": "MAP_EXTENSION and MAP_EXTENSION_EMPTY in tests/rayon.rs can be plain static slices (&[(char, u32)]) instead of Vec-backed LazyLock statics.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MAP_EMPTY in tests/rayon.rs can be...
null
rust-lang__hashbrown__710
rust-lang/hashbrown
710
defect
3bca52e3368231dc9663c00606af30bc6c7b530e
6cb0eb5c55140e110ca30da1138ca763f6cebc47
Fix incorrect length if a hasher panics during rehash
If the user-provided hasher panics during an in-place rehash *and* the key/value types do not need to be dropped (according to `core::mem::needs_drop`) then the length field of the hash map may not be updated correctly. The map will appear to have more elements than it actually does, which will cause iterators (which b...
diff --git a/src/raw.rs b/src/raw.rs index 778ccbb60..39f50ef78 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -2996,14 +2996,17 @@ impl RawTableInner { } let mut guard = guard(self, move |self_| { - if let Some(drop) = drop { - for i in 0..self_.num_buckets() { - ...
1
1
0
[{"id": "G0", "claim": "Each of the 111 iterations of hashmap_reserve_survives_panicking_build_hasher takes about 15s under Miri, so the test should run only specific first, middle, and last indices, e.g. [0, 55, 110].", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__libc__2056
rust-lang/libc
2,056
defect
2f931d9d5789039fdde0419df79eee92c29b1270
6a192794dbff47872785e5b5a86aada64b773e06
Use Rust union types
For #1020 Replace some types with unions now that rustc supports them. I also found `sigevent.sigev_notify_thread_id`, `siginfo_t.__data` and `sigaction.sa_sigaction` that I think should be unions, but I wasn't sure.
diff --git a/libc-test/build.rs b/libc-test/build.rs index 9d97705a1444a..794dadaa676f1 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -293,9 +293,6 @@ fn test_apple(target: &str) { return true; } match ty { - // FIXME: actually a union - "sigval" => tru...
6
5
4
[{"id": "G0", "claim": "The change is a breaking change, so the pull request cannot be merged until the crate version is bumped to 1.0.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Something is wrong with sigval on emscripten (its test fails) and the a...
null
rust-lang__libc__3034
rust-lang/libc
3,034
defect
2cc0b3b0c6e52179f1a04efbe6f2280f965769f7
8a1e0817769e99a3482006fdac64e23145ca4167
adding few more CLONE_* constant for Linux/Android.
closes #3033.
diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index 50979e5f81464..7813c99dd1601 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -206,15 +206,18 @@ CLOCK_TAI CLOCK_THREAD_CPUTIME_ID CLONE_CHILD_CLEARTID CLONE_CHILD_SETTID +CLONE_CLEAR_SIGHAND CLONE_DETACHED...
3
2
2
[{"id": "G0", "claim": "The CI semver check appears to fail on musl for this pull request's changes.", "category": "testing", "verdict": "uncertain", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The CLONE_* constants added by this pull request are undeclared on i686-android, so the libc-test build f...
null
rust-lang__libc__3695
rust-lang/libc
3,695
defect
bcd5546e872f4c69d15458578382e7db22bf6789
8de65378243748d2b746884c47bf523ccbb8e097
adding a handful of linux fanotify data types.
close #3688 here the involved struct [this one](https://github.com/torvalds/linux/blob/0c3836482481200ead7b416ca80c68a29cfdaabd/include/uapi/linux/fanotify.h#L153), [this one](https://github.com/torvalds/linux/blob/0c3836482481200ead7b416ca80c68a29cfdaabd/include/uapi/linux/fanotify.h#L180) and [this one](https:/...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 2f45523187a51..3986069c521c3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3615,7 +3615,11 @@ fn test_linux(target: &str) { return true; } // FIXME: sparc64 CI has old headers - if sparc64 && (ty == "uinput_f...
4
2
1
[{"id": "G0", "claim": "The reviewer asks for confirmation that fanotify_event_info_pidfd and fanotify_event_info_error are correctly GNU-only, noting that glibc does not reexport them (they come only from the uapi header).", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "...
null
rust-lang__libc__3745
rust-lang/libc
3,745
defect
72093f38fbc3c3fec485b0aba6f1ef81ad59ca1e
075ac336b093c29f993746c14bd3b2de3c71c037
freebsd adding execvpe support from 14.1 release
close #3730
diff --git a/.cirrus.yml b/.cirrus.yml index e428871c41b84..1650f3ead158b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ task: name: nightly x86_64-unknown-freebsd-13 freebsd_instance: - image_family: freebsd-13-2 + image_family: freebsd-13-3 setup_script: - pkg install -y libnghttp2 cu...
1
1
0
[{"id": "G0", "claim": "The first parameter of the new `execvpe` declaration should be named `file` rather than `name`, as it is called in the FreeBSD man page for execvp.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__libc__3952
rust-lang/libc
3,952
defect
b9e8477fa7c71408bdbc1eed9821af0783f97bdb
5281edbdcd77c9e41bb8542a7968de834da4a741
Fix CI for FreeBSD 15, on libc-0.2 branch
It was failing for two reasons: * 87fbd9fc71[^1] removed the TCP_MAXPEAKRATE symbol. * 3458bbd392[^2] changed the value of RLIM_NLIMITS Fixes #3947 [^1]: https://github.com/freebsd/freebsd-src/commit/87fbd9fc7fc5f8d79fe5e3dcd13ad02b11a67ef0 [^2]: https://github.com/freebsd/freebsd-src/commit/3458bbd397783f3b...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 75dcd14fc83be..b6472b4ea56a8 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2338,6 +2338,9 @@ fn test_freebsd(target: &str) { // base system anyway. "CTL_MAXID" | "KERN_MAXID" | "HW_MAXID" | "USER_MAXID" => true, + ...
1
1
0
[{"id": "G0", "claim": "Remove `#[doc(hidden)]` from the deprecated TCP_MAXPEAKRATE constant for now so the constant doesn't disappear from the documentation entirely, with it added back in a couple of versions.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__libc__4033
rust-lang/libc
4,033
defect
600e1d195458e0474c9d8c9ffcc574a36f364afb
09337b85f7e9bb8179e4e8cbd62d6a8f36487351
feat: add `aio` for solarish
# Description AIO series method for solarish. The values and signatures are from illumos headers and solaris manual. Closes #4031 # Sources https://www.illumos.org/man/3HEAD/aio.h https://docs.oracle.com/cd/E88353_01/html/E37842/aio.h-3head.html https://github.com/illumos/illumos-gate/blob/master/usr/src/u...
diff --git a/libc-test/build.rs b/libc-test/build.rs index d6b61eae44077..1932aa98e3236 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -786,6 +786,7 @@ fn test_solarish(target: &str) { headers! { cfg: + "aio.h", "ctype.h", "dirent.h", "dlfcn.h", @@ -948,6 +...
3
3
2
[{"id": "G0", "claim": "The newly added solarish `aio_result_t` and `aiocb` struct fields should be `pub` (and named without a leading underscore) so users can construct and read them as documented in aioread(3C).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cl...
null
rust-lang__libc__4480
rust-lang/libc
4,480
defect
2d96246ca5bff3494cf38124aac25268354ac835
0bc0fb42ba3ae1786c94f656a80c1b6c0f4c00c0
Add SECBIT_ constants from securebits.h
# Description This PR adds the `SECBIT_` constants for use with the [`PR_GET_SECUREBITS`](https://github.com/rust-lang/libc/blob/2d96246ca5bff3494cf38124aac25268354ac835/src/unix/linux_like/linux/mod.rs#L3073) and [`PR_SET_SECUREBITS`](https://github.com/rust-lang/libc/blob/2d96246ca5bff3494cf38124aac25268354ac835/s...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 23eef46d3e617..56c169201ace7 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3873,6 +3873,7 @@ fn test_linux(target: &str) { "linux/sched.h", "linux/sctp.h", "linux/seccomp.h", + "linux/securebits.h...
1
1
0
[{"id": "G0", "claim": "Add a `const fn issecure_mask` helper to compute the SECBIT_ constant bit shifts, so the definitions match the kernel's securebits.h source.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__libc__4482
rust-lang/libc
4,482
defect
2d96246ca5bff3494cf38124aac25268354ac835
7e42c7845d96e0a31c51e738143bfb54e1772be3
FreeBSD: Support kernel-offloaded TLS TCP
# Description The PR adds definitions for kernel-offloaded TLS TCP session information sysctls. It is used by the utility to list kTLS connections https://github.com/kostikbel/ktcplist # Sources https://github.com/freebsd/freebsd-src/blob/4078e0d1d6f8189bff44fcad04df256220035f76/sys/sys/ktls.h https://github...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 23eef46d3e617..8ee8a279a883c 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2444,6 +2444,8 @@ fn test_freebsd(target: &str) { "sys/sem.h", "sys/shm.h", "sys/socket.h", + "sys/socket...
3
3
2
[{"id": "G0", "claim": "The spare and padding fields of the newly added FreeBSD structs (xinpgen's _xig_spare32 and _xig_spare64, in_addr_4in6's ia46_pad32) should be private rather than pub, per libc's convention, so future libc versions can replace them without backwards-compatibility problems.", "category": "design"...
null
rust-lang__libc__4484
rust-lang/libc
4,484
defect
2d96246ca5bff3494cf38124aac25268354ac835
f8156f2b4d8f6159238eb9ab9d1815ceac079cfe
ctest: Add macro expansion and ctest entrypoint.
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description This PR adds a function to expand a crate (consisting of either a single file or a fol...
diff --git a/ctest-next/src/generation/generator.rs b/ctest-next/src/generation/generator.rs new file mode 100644 index 0000000000000..ca485d7ba1f9b --- /dev/null +++ b/ctest-next/src/generation/generator.rs @@ -0,0 +1,20 @@ +use std::{error::Error, path::Path}; + +use crate::expand; + +pub struct TestGenerator; + +imp...
11
11
3
[{"id": "G0", "claim": "Make `TestGenerator` a `#[non_exhaustive]` struct with a fieldless unit or `pub` constructor so downstream code cannot build it except through `new()`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the `generation` module ...
null
rust-lang__libc__4511
rust-lang/libc
4,511
defect
5303c3adfb227dd5795bc59d9ca4b7db9d4331a1
6166e511c41803e2b2d9feb4a10d5faadcff5e35
linux: gnu/musl: MAP_32BIT is only defined on x86
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description <!-- Add a short description about what this change does --> The Linux ke...
diff --git a/libc-test/build.rs b/libc-test/build.rs index d64c2259e2be5..a07c3cca4306d 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4305,6 +4305,11 @@ fn test_linux(target: &str) { if old_musl && name == "RLIM_NLIMITS" { return true; } + // FIXME: D...
2
2
1
[{"id": "G0", "claim": "MAP_32BIT should not be dropped on powerpc: mark it deprecated there instead of removing it, and if it causes test failures, add a skip for it in libc-test/build.rs.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new deprecati...
null
rust-lang__libc__4514
rust-lang/libc
4,514
defect
9ba4f41c547b07e4d76c62a6be2092cc2a5e9b3a
ba231371efac68347cec4fa32c6d55f8209ff61c
ctest: Add skips and mappings.
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description This PR adds more methods to the frontend of `TestGenerator`, including the ability to...
diff --git a/ctest-next/src/ast/field.rs b/ctest-next/src/ast/field.rs index 9470f3c3aa036..4645a91f8b50e 100644 --- a/ctest-next/src/ast/field.rs +++ b/ctest-next/src/ast/field.rs @@ -6,12 +6,11 @@ pub struct Field { #[expect(unused)] pub(crate) public: bool, pub(crate) ident: BoxStr, - #[expect(unus...
17
16
0
[{"id": "G0", "claim": "extension() might need to return an array because cpp files are commonly cc or cxx, unless it is only used for output files.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The Language enum should be pub(crate) instead of pub.", "...
null
rust-lang__libc__4558
rust-lang/libc
4,558
defect
d2125d041a9b2c0fd42df436eec340bb0f411755
2da67c73a2a331c4b9a76cf4a768a5edf62e1937
ctest: test ctest-next in ctest-test
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description - Adds support for testing `ctest-next` using the same test crate as `ctest`. - Additio...
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02bd48dd007db..536c4e051f4fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,7 +89,7 @@ jobs: # Remove `-Dwarnings` at the MSRV since lints may be different export RUSTFLAGS="" ...
3
2
0
[{"id": "G0", "claim": "The extract_single_link_name helper can be simplified to return early when there is no `link_name` attribute, restructuring the match and panic as suggested.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The template sho...
null
rust-lang__libc__4582
rust-lang/libc
4,582
defect
5c2db83f665a7fdfeb4535cfc163f2bc3da61eb5
ffd8efef3f3fc56282abfe970a01210dd0375788
Fix the types of constants used for the 'request' argument of ioctl() on AIX
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description The `request` argument of the `ioctl()` function has type `c_int`, but the associated ...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 778b24b2d5e5e..ed065e0bf0768 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -5593,6 +5593,21 @@ fn test_aix(target: &str) { // values because non-unique values are being used which will // fail the test when _ALL_SOURCE is defined...
1
1
0
[{"id": "G0", "claim": "Make the comment on the ioctl-request constants `FIXME(ctest)` so the test-only issue could get better validation on our end.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__libc__4600
rust-lang/libc
4,600
defect
7f3d69697632b79e8a4e1eecd3705e5ab048f66c
3dbb7a52ba4f3642b8f4b584bd15302f1ffc4fa7
libc-test: port windows to use ctest-next
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description This PR adds support for testing the windows platform using `ctest-next` as well as the ...
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 201f9294a141a..c95e3fb96a9a3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,7 +89,7 @@ jobs: # Remove `-Dwarnings` at the MSRV since lints may be different export RUSTFLAGS="" ...
8
5
0
[{"id": "G0", "claim": "Add a comment above the new `test_windows_next` function explaining what it is.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Apply the `allow(deprecated)` to the `use libc::*` import rather than to everything, if that wor...
null
rust-lang__libc__4613
rust-lang/libc
4,613
defect
e634372f7ebe918abccfa9b0de25f6dda2399f66
e96f64c9dcc403c19441afbb758cc36ff95668f0
ctest-next: miscellaneous filtering bug fixes
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description Prepares for porting `libc-test` platforms to use `ctest-next` by fixing numerous bugs. ...
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 201f9294a141a..c95e3fb96a9a3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -89,7 +89,7 @@ jobs: # Remove `-Dwarnings` at the MSRV since lints may be different export RUSTFLAGS="" ...
5
3
0
[{"id": "G0", "claim": "TranslateHelper should keep only the filtered items and drop the unfiltered `ffi_items` field, if possible.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `unused_imports` allow should apply only to the `libc::*` import...
null
rust-lang__libc__4632
rust-lang/libc
4,632
defect
c0071cc9f9385da6352e40824cfd77334e85f72d
1ec083c0ae990b863607566484c3d223718658fa
libc: add padding struct
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description Adds a struct for padding types. <!-- Add a short description about what this change do...
diff --git a/src/lib.rs b/src/lib.rs index ea8fc1172d65c..7801d33c0fd06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,6 +43,9 @@ pub use core::ffi::c_void; #[allow(unused_imports)] // needed while the module is empty on some platforms pub use new::*; +mod types; +pub use types::*; + cfg_if! { if #[cfg(windo...
4
4
3
[{"id": "G0", "claim": "The new `Padding` type should not be publicly exported: make the struct `pub(crate)` and stop re-exporting the types module from lib.rs.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new types module should carry a module-lev...
null
rust-lang__libc__4750
rust-lang/libc
4,750
defect
06a5ca218d6fa4a69b01a27c4c96febab9c1d608
ffaf067d0ba553679a32c6f12fa498645824fc60
Declare field 'tv_nsec' of structure 'timespec' as 'i32' for AIX
On AIX, <sys/stat.h> declares field `tv_nsec` of `struct timespec` as `long`, but the underlying system calls return a 4-byte value in both 32-bit and 64-bit modes. This PR changes to declare `tv_nsec` as `i32` in the `libc` crate to avoid including the other undefined 4 bytes in the 64-bit mode. <!-- Thank you for...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 640c9dd31664f..b1ed4bebbbce3 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -5587,6 +5587,12 @@ fn test_aix(target: &str) { // The field 'data' is actually a unnamed union in the AIX header. "pollfd_ext" if field.ident() =...
2
1
0
[{"id": "G0", "claim": "To keep things cleaner, the AIX-specific timespec definition should be excluded from the shared struct in src/unix/mod.rs (exclude target_os = \"aix\" there) and instead be placed in src/unix/aix/mod.rs.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introdu...
null
rust-lang__libc__4882
rust-lang/libc
4,882
defect
c24866a08188df1121766142e3d587f8e3f9e378
6f117c5039fbed7aa71f484cdfd8bac08d906c50
links old version of cf{g,s}et{i,o}speed for glibc
# Description ~Fixes~ https://github.com/rust-lang/libc/issues/4692. # Sources https://github.com/bminor/glibc <details> <summary>cfsetspeed</summary> ``` ./sysdeps/mach/hurd/i386/libc.abilist:GLIBC_2.2.6 cfsetspeed ./sysdeps/mach/hurd/x86_64/libc.abilist:GLIBC_2.38 cfsetspeed ./sysdeps/unix/sysv/l...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 25126877d450d..da9f890a64a63 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4853,6 +4853,30 @@ fn test_linux(target: &str) { }); } + if gnu { + // old constants, so tests fail if glibc is too new + cfg.skip_const(|...
2
1
1
[{"id": "G0", "claim": "Since the function pointers cannot be tested, an integration test under libc-test/tests should be added to verify correct linking and that the baud constants work.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A binary linked ag...
null
rust-lang__libc__4903
rust-lang/libc
4,903
defect
8ecae6cae62df6bf8123b87f60b964a554af1863
6e883bbdcf4c92fb26af77e5db161ec036519894
Fix CMSG_NXTHDR soundness and boundary checks
### Fixes: - Properly reflect that musl and some descendants do not allow zero-sized payloads being in `CMSG_NXTHDR` [musl_ref]. - Unsoundness in linux and l4re. Makes sure that the header of next is within max, returning null if not. (Similar to how glibc does it.) It is the fix that should have been made rust-l...
diff --git a/src/unix/linux_like/linux_l4re_shared.rs b/src/unix/linux_like/linux_l4re_shared.rs index bd3cfafeb6e72..7fae06c781b41 100644 --- a/src/unix/linux_like/linux_l4re_shared.rs +++ b/src/unix/linux_like/linux_l4re_shared.rs @@ -1493,15 +1493,14 @@ f! { if ((*cmsg).cmsg_len as usize) < size_of::<crate:...
2
1
1
[{"id": "G0", "claim": "Use pointer arithmetic (`.add`/`.wrapping_add`) instead of casting to `usize` and back in `CMSG_NXTHDR`, preferably `wrapping_add` so the function is precondition-free rather than UB when called with invalid input.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "...
null
rust-lang__libc__4985
rust-lang/libc
4,985
defect
a41bc082ed4e42d8817caadfc82fabed7f6fd9bc
0ba4ea51d66db28fcfa2577d23acc746d693df19
NetBSD: add `kinfo_file`, `kinfo_pcb` structures and related constants
<!-- Thank you for submitting a PR! We have the contribution guide, please read it if you are new here! <https://github.com/rust-lang/libc/blob/main/CONTRIBUTING.md> Please fill out the below template. --> # Description <!-- Add a short description about what this change does --> This PR extends **NetB...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 1cbacfde9d979..b66fc6d23a6ac 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1429,6 +1429,8 @@ fn test_netbsd(target: &str) { ("ifreq", "ifr_ifru") => true, ("utmpx", "ut_exit") => true, ("posix_spawn_file_act...
5
5
5
[{"id": "G0", "claim": "The unsound PartialEq/Hash impls on the new union structs should not be added, and any new structs containing unions must be placed inside `s_no_extra_traits!`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "New-header consta...
null
rust-lang__libc__4988
rust-lang/libc
4,988
defect
939f0090c2190755b0617172ba1b8ddbc5077d20
c343e3452d16612ef4db82906730a54a7b92ddd7
Linux: add `name_to_handle_at` and `open_by_handle_at`
# Description Add file handle operations for Linux. In particular I added: - `name_to_handle_at()` - `open_by_handle_at()` - `file_handle` - `MAX_HANDLE_SZ` - `AT_HANDLE_MNT_ID_UNIQUE` - `AT_HANDLE_FID` - `AT_HANDLE_CONNECTABLE` # Sources - [`file_handle` struct (glibc)](https://github.com/bminor/gli...
diff --git a/libc-test/build.rs b/libc-test/build.rs index 1cbacfde9d979..49ba9d1fc2a7f 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3671,6 +3671,7 @@ fn test_linux(target: &str) { } let arm = target.contains("arm"); + let eabihf = target.contains("eabihf"); let aarch64 = target.cont...
1
1
1
[{"id": "G0", "claim": "Put the musl `file_handle` size-check skip in `skip_struct_field` instead of skipping the whole struct, grouped under the existing `// FAM` comment.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__libc__5080
rust-lang/libc
5,080
defect
545663c3553890efe170b273ecd73b6f3dfb9f75
c1c93ddb3bbdef211637dcd507f1ea91668b816a
cargo: use workspace-level lints
Closes https://github.com/rust-lang/libc/pull/4406 @rustbot label +stable-nominated
diff --git a/Cargo.toml b/Cargo.toml index 0986492aae876..90088f43f12fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -175,14 +175,11 @@ members = [ "libc-test", ] -# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64 -# This way all crates can use it with `[lints] workspa...
2
1
0
[{"id": "G0", "claim": "Change `.map_or_else(|| Abi::C, |s| Abi::from(s.value().as_str()))` to use the constant directly, e.g. `.map(|s| Abi::from(s.value().as_str())).unwrap_or(Abi::C)`, instead of an `or_else` closure.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ...
null
rust-lang__log__187
rust-lang/log
187
defect
ec2e44dd239dc299629a40b937e342e7c2d37d22
c32c1bf42db12a9d3b1b1fa847ae3024b3a068d9
Change set_logger to panic on error
There might be more things to fix. But just wanted to get feedback if I am on right track! Fix to issue #146
diff --git a/env/src/lib.rs b/env/src/lib.rs index 5561bb502..10c55d113 100644 --- a/env/src/lib.rs +++ b/env/src/lib.rs @@ -269,17 +269,25 @@ impl Builder { self } + pub fn try_init(&mut self) -> Result<(), SetLoggerError> { + log::try_set_logger(|max_level| { + let logger = self.b...
7
7
5
[{"id": "G0", "claim": "The Builder::init doc comment should say that future initialization attempts will panic instead of saying they will return an error.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The docs for set_logger should mention that...
null
rust-lang__log__196
rust-lang/log
196
defect
da1870ed58854bf6fd549c8a43c6871c9373d6ef
c3ded0a45ff47d96afdd2f2ee2161f5a1be54cce
remove shutdown and add `flush` to `Log` trait
Fixes #117
diff --git a/src/lib.rs b/src/lib.rs index 882e21443..a9e91fed3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -186,11 +186,10 @@ //! # impl log::Log for SimpleLogger { //! # fn enabled(&self, _: &Metadata) -> bool { false } //! # fn log(&self, _: &log::Record) {} -//! # } -//! # impl SimpleLogger { //! # fn flu...
4
2
1
[{"id": "G0", "claim": "The refcount-based synchronization in LoggerGuard's Drop that the pull request removes needs to stick around, since Log is not an unsafe trait.", "category": "correctness", "verdict": "opposed", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The loads and stores from STATE only...
null
rust-lang__log__217
rust-lang/log
217
defect
25e349c7389ab63a9f5303a9a6183aa9d723b0a0
de2a06b19185ace3db56f83d5abae2a26e0412c1
Shim 0.3.x into 0.4.x
0.3.x loggers turn into 0.4.x loggers, and all log records from 0.3.x and 0.4.x will route to the registered logger, whether it be an 0.3.x logger or 0.4.x logger. r? @alexcrichton @dtolnay Closes #148.
diff --git a/Cargo.toml b/Cargo.toml index 7f4645379..1adcfb8c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,20 +18,23 @@ name = "filters" harness = false [features] -max_level_off = [] -max_level_error = [] -max_level_warn = [] -max_level_info = [] -max_level_debug = [] -max_level_trace = [] +max_level_off ...
2
1
1
[{"id": "G0", "claim": "The 0.3.x statics (LOGGER, STATE, REFCOUNT) may be obsolete under the new 0.4 shim and should perhaps be deleted now.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The new self-dependency makes Travis hit ambiguous-crate...
null
rust-lang__log__353
rust-lang/log
353
defect
364b9b6ebf0a0fb66c429b3bda55f59f1f9db458
a0546badc26d504d8e1d90fcbb13e82d76ae6009
kv macro support
Adds key-value support to the log macros. Supersedes #346. Refs #343 #328. Thanks! ## Syntax ```rust femme::start(log::LevelFilter::Info).unwrap(); info!("hello"); info!("hello",); info!("hello {}", "cats"); info!("hello {}", "cats",); info!("hello {}", "cats", { cat_1: "chashu", cat_2: "nori", });...
diff --git a/src/lib.rs b/src/lib.rs index e113e62bf..e5423860c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -846,7 +846,7 @@ impl<'a> Record<'a> { file: self.file, line: self.line, key_values: self.key_values.clone(), - } + }, } } }...
3
2
1
[{"id": "G0", "claim": "The new kvs parameter of __private_api_log should use `&ToValue` instead of plain `&str` pairs so that the structure of captured values can be retained.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The rework of the `log!` macro...
null
rust-lang__log__476
rust-lang/log
476
defect
77ae39bfc74a295d848e54b4231eb89075338ee5
505c255f0a2e0eab946bb5740060d844bd7f2684
Allow macros to be more consistent with kvs
Part of #436 This tweaks the new key-value macro syntax slightly so that it can be more consistent in cases where key-values are supplied and in cases where they're not. All the old syntax is still supported, but we can now write `log!` macros like: ```rust info!(target = "my_target"; "format {string}"); ``` ...
diff --git a/Cargo.toml b/Cargo.toml index a8bf0abb9..5a67bdce6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,6 +59,7 @@ sval = { version = "=1.0.0-alpha.5", optional = true, default-features = false } value-bag = { version = "=1.0.0-alpha.8", optional = true, default-features = false } [dev-dependencies] +rustve...
2
2
1
[{"id": "G0", "claim": "The kv macros should not require `target = x;` but keep the existing `target: x` form, which is what is currently used and is clearer about the target being special (retrievable via `Record::target`) and leaves `target` free as a key-value key.", "category": "design", "verdict": "supported", "pr...
null
rust-lang__log__486
rust-lang/log
486
defect
f9f459a698edd1dc7f71373c415cf7ae43f07e50
9a7f54335c8b2f2f6bdb40b22f23d62e6f0996d4
Support static string as key value
Fixes https://github.com/rust-lang/log/issues/484.
diff --git a/src/macros.rs b/src/macros.rs index d1177c99a..f6285368a 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -30,7 +30,7 @@ #[macro_export(local_inner_macros)] macro_rules! log { // log!(target: "my_target", Level::Info; key1 = 42, key2 = true; "a {} event", "log"); - (target: $target:expr, $lvl:ex...
1
1
1
[{"id": "G0", "claim": "Stringifying keys with the tt-munching `__log_stringify!` would include the surrounding double quotes in string keys (a key like `string/key` arrives with extra quote characters around its value), and the tests added by this PR are flawed because they should have caught that.", "category": "corr...
null
rust-lang__log__58
rust-lang/log
58
defect
1a586d04a7e741f11fac30144bc461e706fa9dc7
9326328d4ad40378b0e544e1195210c5c1b055ea
Statically disable debug logging in optimized builds
This PR modifies `log!` and associated macros to disable logging at compile time for the Debug and Trace log levels when the `debug_assertions` option is disabled (which it is by default when optimizations are enabled). The goal of this change is to make it easy to leave debug logging in place throughout a project and...
diff --git a/.travis.yml b/.travis.yml index a9ea05ef2..6a4dbc9ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,15 @@ language: rust sudo: false rust: - - 1.0.0 + - stable - beta - nightly script: - cargo build --verbose - cargo test --verbose - cargo test --verbose --manifest-path env/Car...
7
6
4
[{"id": "G0", "claim": "Consider putting the static debug-logging disabling behind a feature flag so the old behavior (debug logs present in release builds) can be preserved.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a test for this (static max-...
null
rust-lang__log__637
rust-lang/log
637
defect
d5ba2cfee9b3b4ca1fcad911b7f59dc79eeee022
0aaa10df468fe18cc7dd16a2140e4c5b0a195b51
Fix some typos
Tried to furhter understand how this actually works and fixed some typos on the way. Great code quality, thanks to the rust-lang team!
diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..b58b603fe --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/log.iml b/.idea/log.iml new file mode 100644 ind...
1
1
0
[{"id": "G0", "claim": "Remove the .idea directory from the repository.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__log__664
rust-lang/log
664
defect
22be810729014e1e43267fc62fe6df0d7a29aaf7
a3f72c8fbe31eb06e7aa3451da6246470c0eade4
Add an optional logger param
This closes #645 @KodrAus I noticed that we previously introduced `target` for similar usage, but switching to a different logger is different. This patch is for preview. I'm not quite sure how we pass the customized logger. The current implementation seems good. I think the `log` crate itself isn't suitable to ...
diff --git a/src/__private_api.rs b/src/__private_api.rs index 11bc2fc1c..1331568bf 100644 --- a/src/__private_api.rs +++ b/src/__private_api.rs @@ -1,7 +1,7 @@ //! WARNING: this is not part of the crate's public API and is subject to change at any time use self::sealed::KVs; -use crate::{Level, Metadata, Record}; ...
12
6
5
[{"id": "G0", "claim": "The newly added type parameter seems to require extra type information on Rust 1.60 (the MSRV), so the macro needs it specified.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Passing a logger to the macros is not a common en...
null
rust-lang__log__70
rust-lang/log
70
defect
7067c9b8c1f1a46ab66fd23b7df0e7aa00fe3a87
2ad3e3dfc27068222059facdca4532a5a609714f
Add support for no_std
Second attempt at support `no_std`, this time without splitting the crate into two. Instead, a `use_std` feature is used, which is enabled by default. Fixes #13
diff --git a/.travis.yml b/.travis.yml index 15b6a4778..be431977f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,15 @@ language: rust sudo: false rust: - - 1.0.0 - stable - beta - nightly script: - cargo build --verbose + - ([ $TRAVIS_RUST_VERSION != stable ] && cargo build --verbose --no-defa...
7
7
2
[{"id": "G0", "claim": "no_std should be usable even during `--test`, so the `not(test)` clauses on the crate-level attributes are unnecessary; instead the tests should pull in std themselves via an `extern crate std` inside the test module.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "in...
null
rust-lang__mdBook__1237
rust-lang/mdBook
1,237
defect
6c4c3448e35b527253e0d0cd138a70c078514eb0
5907caa732eb7810d66485d33ace5aff67ab3fa4
Implement URL redirecting
This is a fairly straightforward implementation based on the comments from #430. Fixes #430, CC #1235. --- Some potential future work would be allowing the user to configure redirects inline with a `[output.html.redirect]` table in `book.toml` or reading from a `key = value` file discovered by having some sort...
diff --git a/book-example/src/format/config.md b/book-example/src/format/config.md index c1a97aa7b8..e8b7e9aad2 100644 --- a/book-example/src/format/config.md +++ b/book-example/src/format/config.md @@ -198,6 +198,10 @@ The following configuration options are available: an icon link will be output in the menu bar of...
2
1
1
[{"id": "G0", "claim": "The docs' emphasis that a redirect's value can be an *absolute* path seems back-to-front, since a relative value like \"relative.html\" would resolve correctly and it is the moved page (the key) that needs the absolute path.", "category": "documentation", "verdict": "supported", "priority": "P1"...
null
rust-lang__mdBook__1829
rust-lang/mdBook
1,829
defect
2f5e89f3ec05b6cc08c1ae5914e7db5953489fda
aa83d7e9e82a262435517d3030818bf723cd9d44
Fix up "index page" functionality
- Fixes #1814 by only marking the first non-draft chapter as the "index" page, and adds a test for that - Makes the link to the first chapter active in the "index" page, improving consistency (and making the aforementioned test pass without hacks) Additionally, I would've liked to document that "index page" functio...
diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index 8a13db9f09e..250a393c401 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -116,7 +116,7 @@ impl HtmlHandlebars { if ctx.is_index { ...
2
2
0
[{"id": "G0", "claim": "The new test should read the compared files into memory and use pretty_assertions::assert_eq to get a highlighted context diff, instead of the hand-rolled line-by-line comparison that prints differences itself.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "...
null
rust-lang__mdBook__2554
rust-lang/mdBook
2,554
defect
07b25cdb643899aeca2307fbab7690fa7eeec36b
7f4f1891336bc15c2164e555d7c2c0b32dc3740e
Fix eslint warnings and add eslint check in CI
First commit comes from https://github.com/rust-lang/mdBook/pull/2552. This PR fixed all eslint warnings and added it as a check in the CI. That is a first step in improving the JS quality. cc @notriddle
diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000000..32efe898a06 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,95 @@ +{ + "env": { + "browser": true, + "node": true, + "es6": true + }, + "extends": "eslint:recommended", + "globals": { + "module": "...
2
2
2
[{"id": "G0", "claim": "Use serde_json, which is already in the dependency tree, instead of the json crate to parse the browser-ui-test version in tests/gui/runner.rs.", "category": "maintainability", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add documentation to CONTRIBUT...
null
rust-lang__mdBook__2729
rust-lang/mdBook
2,729
defect
e8dff6f97e6558655fe92290744bb4312b3f3c4e
05b21363eac3e61d41e4be13ae80a87bf85c3f2e
Show where the book was generated
It now looks like this: ``` $ cargo run -- build test_book/ Compiling mdbook v0.4.51 (/somewhere/mdBook) Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.48s Running `target/debug/mdbook build test_book/` 2025-06-12 21:33:28 [INFO] (mdbook::book): Book building has started 2025-06-12...
diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index a144b32b573..210aac22d61 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -16,7 +16,7 @@ use std::sync::LazyLock; use crate::utils::fs::get_404...
1
1
0
[{"id": "G0", "claim": "The new log line should report the HTML renderer's own `destination` rather than `build_dir`, since the root output directory might not be where the HTML output actually resides (e.g. `info!(\"HTML book written to `{}`\", destination.display());`).", "category": "correctness", "verdict": "suppor...
null
rust-lang__mdBook__524
rust-lang/mdBook
524
defect
e74c3768330461b4804415ffa88f8de9059897be
6323dfa931a6a7056a0eaaf693bca5c2cb9c88c0
Prohibit 'print.md' files
Fix #258 by emmiting an error whenever an mdBook contains a `print.md` file in its root.
diff --git a/src/lib.rs b/src/lib.rs index 47014ff741..71e0711e4a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,6 +146,11 @@ pub mod errors { description("A SUMMARY.md parsing error") display("Error at line {}, column {}: {}", line, col, message) } + + Reserv...
3
3
1
[{"id": "G0", "claim": "The ReservedFilenameError variant can be simplified by dropping the redundant message parameter and using PathBuf, since the display is nearly always \"{filename} is reserved for internal use\".", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"...
null
rust-lang__measureme__131
rust-lang/measureme
131
defect
38e462d1d015d73dc8b08c325fb45bb6ca1f5125
e5add84857479a472b82b3de36add29662a15eac
Remove the SerializationSink trait
This PR removes the `SerializationSink` trait and thus the ability to plug in different serialization strategies at the client level. The `FileSerializationSink` is now the only implementation and is renamed to just `SerializationSink`. This simplifies the public interface of the `measureme` crate. r? @wesleywise...
diff --git a/analyzeme/benches/serialization_bench.rs b/analyzeme/benches/serialization_bench.rs index 28bd7fc..3a0b882 100644 --- a/analyzeme/benches/serialization_bench.rs +++ b/analyzeme/benches/serialization_bench.rs @@ -3,48 +3,17 @@ extern crate test; use analyzeme::testing_common; -use measureme::{FileSerial...
2
1
0
[{"id": "G0", "claim": "Consider gating the test-only serialization machinery (the in-memory BackingStorage/drain_bytes support and the new_in_memory/into_bytes API) behind #[cfg(test)] so it is not compiled into non-test builds.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"...
null
rust-lang__measureme__8
rust-lang/measureme
8
defect
2f74c7fd2443d558fe0d0df9b15f73bb8b0f83a6
e657ddc570ef9cff5a5ba8e0624751347e257ae1
Add end-to-end test for event serialization.
Adds and end-to-end test for event serialization (an adaption of the end-to-end example). This should make it more convenient to implement the `MmapSerializationSink`.
diff --git a/measureme/tests/serialization.rs b/measureme/tests/serialization.rs new file mode 100644 index 0000000..b4f4c3a --- /dev/null +++ b/measureme/tests/serialization.rs @@ -0,0 +1,108 @@ +use measureme::{ + Event, FileSerializationSink, Profiler, ProfilingData, SerializationSink, StringId, + TimestampKin...
1
1
0
[{"id": "G0", "claim": "The files generated by the test may show up in git status; if so, they should be covered by .gitignore.", "category": "hygiene", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__measureme__88
rust-lang/measureme
88
defect
9476b163d4cdd1bdce8e542cfb84e4129c712927
8367ec654b31ed73c14f50addbc76388aa261f6b
Optimize FileSerializationSink by using parking_lot::Mutex and avoiding heap allocations in write_atomic.
This PR makes the `FileSerializationSink` exactly as fast as the `MmapSerializationSink` in the benchmarks we have. But I only tested on Linux and I also remember that the benchmarks were no good indication of performance when used in `rustc`. It would be nice if we could get rid of the `MmapSerializationSink` becau...
diff --git a/measureme/Cargo.toml b/measureme/Cargo.toml index 9228170..c810c9d 100644 --- a/measureme/Cargo.toml +++ b/measureme/Cargo.toml @@ -15,6 +15,7 @@ travis-ci = { repository = "rust-lang/measureme" } [dependencies] byteorder = "1.2.7" rustc-hash = "1.0.1" +parking_lot = "0.9" [target.'cfg(not(target_arc...
5
3
1
[{"id": "G0", "claim": "The benchmarks generate too little data to be realistic (less than a megabyte) and a multi-threaded benchmark would be good.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Adding the parking_lot dependency pulls in a fair numbe...
null
rust-lang__miri__2228
rust-lang/miri
2,228
defect
ada7b72a879d79aaa06f0a2a95edd520615da1a2
b6bcbf76fdd4da771977c1591eaec3faad05a9f3
Prevent futex_wait from actually waiting if a concurrent waker was executed before us
Fixes #2223 Two SC fences were placed in `futex_wake` (after the caller has changed `addr`), and in `futex_wait` (before we read `addr`). This guarantees that `futex_wait` sees the value written to `addr` before the last `futex_wake` call, should one exists, and avoid going into sleep with no one else to wake us up....
diff --git a/src/shims/unix/linux/sync.rs b/src/shims/unix/linux/sync.rs index 72898baa4b..42494da37b 100644 --- a/src/shims/unix/linux/sync.rs +++ b/src/shims/unix/linux/sync.rs @@ -126,24 +126,26 @@ pub fn futex<'tcx>( Align::from_bytes(4).unwrap(), CheckInAllocMsg::MemoryAccessTest,...
4
4
2
[{"id": "G0", "claim": "The PR author should explain, and then RalfJung asks that the reasoning be documented, why the wake-side SeqCst fence correctly orders a racing wait and wake, ultimately relying on the fence, the atomic read and the enqueue being non-preemptible.", "category": "documentation", "verdict": "suppor...
null
rust-lang__miri__2601
rust-lang/miri
2,601
defect
86f0e63b21721fe2c14608644f467b9cb21945eb
dd8ede2ad33b15d8636cd6b05b5f39891c1584b9
Add Windows InitOnceBeginInitialize and InitOnceComplete shims
Fixes #2595
diff --git a/src/concurrency/sync.rs b/src/concurrency/sync.rs index 464f452ca76..18920951049 100644 --- a/src/concurrency/sync.rs +++ b/src/concurrency/sync.rs @@ -7,6 +7,7 @@ use log::trace; use rustc_data_structures::fx::FxHashMap; use rustc_index::vec::{Idx, IndexVec}; +use super::thread::MachineCallback; use ...
10
9
0
[{"id": "G0", "claim": "InitOnceStatus's manual `Default` impl should instead use the new `#[default]` derive attribute.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The id conversion methods could be auto-implemented for the id types via a tr...
null
rust-lang__miri__2638
rust-lang/miri
2,638
defect
7138140ef9497a88a99f1fd0df59e4a43cf049d6
b2a6e858e395baa417d4b6456601fac0a098ff43
Implement condvars for Windows
Adds 3 shims for Windows: `SleepConditionVariableSRW`, `WakeConditionVariable`, `WakeAllConditionVariable` to add support for condvars (which fixes #2628). Salvaged from what was removed from #2231
diff --git a/src/concurrency/sync.rs b/src/concurrency/sync.rs index e76610e7302..48f9e605276 100644 --- a/src/concurrency/sync.rs +++ b/src/concurrency/sync.rs @@ -121,8 +121,10 @@ declare_id!(CondvarId); struct CondvarWaiter { /// The thread that is waiting on this variable. thread: ThreadId, - /// The ...
5
5
2
[{"id": "G0", "claim": "In `reacquire_cond_lock` the `rwlock_is_locked` and `rwlock_is_write_locked` checks are swapped between the shared and exclusive branches, so a writer reacquiring while the lock is only read-locked would take the write lock immediately instead of blocking.", "category": "correctness", "verdict":...
null
rust-lang__miri__2721
rust-lang/miri
2,721
defect
ac7a752a2a61f6db58bd90190d7420a9251c0383
7903f731bacf25d52e438f8a747a5dc5d497b1ad
Allow configurable and platform-specific page sizes
This fixes #2644 by setting platform-default page sizes along with a command line flag to override size to a specific value (e.g. in the case of aarch64 Linux on M1 silicon). There's still some code cleanup to be done and tests need to be added but I'm opening this for now.
diff --git a/README.md b/README.md index dac0a9820b9..909e5bd510d 100644 --- a/README.md +++ b/README.md @@ -399,6 +399,8 @@ to Miri failing to detect cases of undefined behavior in a program. * `-Zmiri-track-weak-memory-loads` shows a backtrace when weak memory emulation returns an outdated value from a load. This...
4
4
2
[{"id": "G0", "claim": "next_base_addr should keep being initialised from machine.stack_addr as it was before this change, rather than from the page size (defaulting to 128k).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The hard-coded non-4K page...
null
rust-lang__miri__2798
rust-lang/miri
2,798
defect
140dd98fdfc526c8da78f33c57815cbda3bdf4bd
525e8355243571c68d4b77d13047738ead1ee0ae
Get Miri working on ARM
- Add a shim for `llvm.arm.hint`, which is required by `core::hint::spin_loop` on `arm` targets. The shim simply calls `yield_active_thread` on a YIELD hint, just like the shim for `llvm.aarch64.isb` that's already present. - Change the signature of `miri_host_to_target_path` to use `c_char` instead of `i8`, to make i...
diff --git a/README.md b/README.md index 48581f6bbf..c60d6593bd 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,9 @@ degree documented below): - The best-supported target is `x86_64-unknown-linux-gnu`. Miri releases are blocked on things working with this target. Most other Linux targets should also work w...
2
2
0
[{"id": "G0", "claim": "The new ARM targets' tests lengthen the ubuntu CI runtime (36m vs 23m on master), so they should be distributed to the macos and windows builders -- potentially running some of them only at bors time.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ...
null
rust-lang__miri__2890
rust-lang/miri
2,890
defect
67d4fafd0ea7290cb0261aa8f40190c57f684cd8
e54f3236bd4cdf626e59f19755f9d2ebd5057dab
Add `./miri run-dep` for running a file with test dependencies available
fixes #2443
diff --git a/miri b/miri index 4be970b398..9e33f525c8 100755 --- a/miri +++ b/miri @@ -306,7 +306,7 @@ test|bless) # Only in root project as `cargo-miri` has no tests. $CARGO test $CARGO_EXTRA_FLAGS --manifest-path "$MIRIDIR"/Cargo.toml "$@" ;; -run) +run|run-dep) # Scan for "--target" to overwrite ...
6
6
4
[{"id": "G0", "claim": "The new config-building function is named `run_test_config` although it does not run the config, so `run` should not be in the function name.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `miri-run-dep-mode` sentinel...
null
rust-lang__miri__2931
rust-lang/miri
2,931
defect
949b1dcacab5553793a8ea2c4d3c6baf39fc03cf
2fd2ed1044d78bf3acd93d70d5f18f00c6156679
Treat thread-local statics on main thread as static roots for leakage analysis
Miri currently treats allocations as leaked if they're only referenced in thread-local statics. For threads other than the main thread, this is correct, since the thread can terminate before the program does, but references in the main thread's locals should be treated as living for the duration of the program since th...
diff --git a/src/concurrency/thread.rs b/src/concurrency/thread.rs index 25c8df43ee..04f0a6c66a 100644 --- a/src/concurrency/thread.rs +++ b/src/concurrency/thread.rs @@ -1073,6 +1073,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { for ptr in this.machine.thr...
7
6
2
[{"id": "G0", "claim": "All the static roots added by the PR are deallocated at the end of the program, causing the leaked allocations within them to not be detected anymore.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The tests should make sure ...
null
rust-lang__miri__2969
rust-lang/miri
2,969
defect
3bbf1053f60d7afa46d4e202cb147483e3c228f7
c00fa0922a0a292e43036582ac468ec48330180a
Stop parsing ui_test annotations in `run-dep` mode
fixes #2967
diff --git a/Cargo.lock b/Cargo.lock index edb3ee48a4e..4232d7fda78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -842,9 +842,9 @@ dependencies = [ [[package]] name = "ui_test" -version = "0.11.6" +version = "0.11.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a2e70adc9d18b9b4dd80...
5
3
0
[{"id": "G0", "claim": "`./miri run-dep` should pass the user's `--edition` argument through, and the default/`./miri run` edition behaviour should match (`./miri run` should also add `--edition 2021`).", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
rust-lang__miri__3600
rust-lang/miri
3,600
defect
24fc363cbcb04e686ff399b9a96babb99e50b45e
edc96dace62f9f2b7db30dfa96bac37e6119ad41
Use non-null pointer for size 0 posix memalign
Fixes #3576
diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index 08f64e499b5..b01825784ae 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -260,7 +260,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> { this...
2
2
1
[{"id": "G0", "claim": "Running the size-0 posix_memalign pass test reports a memory leak when the `assert!(ptr.is_aligned_to(align))` line is included, even though `ptr` is freed afterwards, which the author does not think should be reported.", "category": "correctness", "verdict": "supported", "priority": "P1", "scop...
null
rust-lang__miri__3609
rust-lang/miri
3,609
defect
3ab1107f6948faa7b82d3f82d09d215ce5f1f838
89ef3b864590bbc3442132d82e3672fc83d472d9
Add socketpair shim
Fixes #3442 Design proposal: https://hackmd.io/@tiif/Skhc1t0-C
diff --git a/src/shims/unix/socket.rs b/src/shims/unix/socket.rs index 11fd83f57e6..c64294501b1 100644 --- a/src/shims/unix/socket.rs +++ b/src/shims/unix/socket.rs @@ -1,15 +1,22 @@ +use std::cell::RefCell; +use std::collections::VecDeque; use std::io; +use std::rc::Rc; use crate::shims::unix::*; use crate::*; ...
16
16
6
[{"id": "G0", "claim": "The magic number 212992 used for the socketpair buffer capacity should live in a named constant with documentation.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The socketpair buffers have no synchronisation with the da...
null
rust-lang__miri__3650
rust-lang/miri
3,650
defect
bbe810805f743719df7860d07803ddae7362c913
8990b9e6bde253d4c147a3c9a8220a719d79ab59
Add eventfd shim
Fixes #3445 Design docs: https://hackmd.io/@tiif/rk9hlmP4R
diff --git a/src/shims/unix/linux/eventfd.rs b/src/shims/unix/linux/eventfd.rs index 777142b25c4..3080d5b8d07 100644 --- a/src/shims/unix/linux/eventfd.rs +++ b/src/shims/unix/linux/eventfd.rs @@ -1,14 +1,20 @@ //! Linux `eventfd` implementation. -//! Currently just a stub. use std::io; +use std::io::{Error, ErrorKin...
12
2
0
[{"id": "G0", "claim": "The write-block test should build the u64-1 buffer with `(u64::max_value() - 1).to_ne_bytes()` instead of hand-written endianness-dependent byte arrays.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The pass test should ...
null
rust-lang__miri__3689
rust-lang/miri
3,689
defect
314f7f2f0c1e9a7094a69ec99f85ec3f17a85846
2e6216f39de7ad867b52f52d893b1740ab798074
Fix ICE caused by seeking past `i64::MAX`
Make Miri behave the same as standard library on file seeking offset. Fixes #3680.
diff --git a/src/shims/unix/fs.rs b/src/shims/unix/fs.rs index 262e71756c6..a3e8fb17c27 100644 --- a/src/shims/unix/fs.rs +++ b/src/shims/unix/fs.rs @@ -395,7 +395,9 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { // Isolation check is done via `FileDescriptor` trait. let seek_from...
3
2
2
[{"id": "G0", "claim": "For SEEK_SET with a negative offset the shim should not wrap the offset and call file_descriptor.seek; since Miri implements POSIX lseek, it should return EINVAL directly instead of the standard-library-consistent cast added at S1.", "category": "correctness", "verdict": "supported", "priority":...
null
rust-lang__miri__3707
rust-lang/miri
3,707
defect
311e7807927aef89159d1aef8657aace264a7af3
8b1ac38f01e3b270fa6edf4fbacd49fde1147aad
Add syscall `dup()` for unix target
Add support for `dup()` and `dup2()`. Fixes #3454
diff --git a/src/shims/unix/fd.rs b/src/shims/unix/fd.rs index 599f78e712a..a7237607f72 100644 --- a/src/shims/unix/fd.rs +++ b/src/shims/unix/fd.rs @@ -273,6 +273,35 @@ impl FdTable { impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {} pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { + ...
4
3
1
[{"id": "G0", "claim": "M001 asks what happens if old_fd and new_fd in dup2 point to the same file description — whether closing new_fd would leave old_fd pointing to a destructed file description, given that dup2 on such an alias is a valid operation.", "category": "correctness", "verdict": "opposed", "priority": "P1"...
null
rust-lang__miri__3756
rust-lang/miri
3,756
defect
a9190c934b05ab803240dac1ab21c8393050063e
f293d1ec40270875a751662bc3d524e3c88d0dfd
Add `gettid` support
Add support for `gettid` in miri. To ensure that the requirement that `getpid() == gettdi()` for the main thread, we use the value returned by `getpid` and add to it the internal thread index. Since `getpid` is only supported when isolation is disabled, and we want `gettid` to be used both in isolated and non-is...
diff --git a/src/shims/unix/env.rs b/src/shims/unix/env.rs index 405431f4327..90afc26d5ee 100644 --- a/src/shims/unix/env.rs +++ b/src/shims/unix/env.rs @@ -274,12 +274,30 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let this = self.eval_context_mut(); this.assert_target_os_is_uni...
9
9
4
[{"id": "G0", "claim": "The getpid_with_isolation test only uses std, so the `//@only-target-linux` gate is unnecessary and the test should run on all tested targets (which requires supporting GetCurrentProcessId in isolation mode on Windows).", "category": "testing", "verdict": "supported", "priority": "P2", "scope": ...
null
rust-lang__miri__3784
rust-lang/miri
3,784
defect
4b649ebc56410e6201a2ac361cb7c0aebbd6cdb7
7b044ba588c614ba8287cc47b976366f51178b22
Detect when pthread_mutex_t is moved
What I am not sure about this PR is how to support storing the additional mutex data like its address and kind. If I understand correctly the `concurrency::sync::Mutex` struct is to be used by any mutex implementation. This possibly means that different implementation might want to store different data in the mutex. So...
diff --git a/src/concurrency/sync.rs b/src/concurrency/sync.rs index d0c9a4600e8..630877774b7 100644 --- a/src/concurrency/sync.rs +++ b/src/concurrency/sync.rs @@ -66,6 +66,30 @@ pub(super) use declare_id; declare_id!(MutexId); +/// The mutex kind. +#[derive(Debug, Clone, Copy)] +pub struct MutexKind(i32); + +imp...
9
9
2
[{"id": "G0", "claim": "Push the right values immediately when creating the mutex instead of initializing with default values and then changing them.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rework the unix sync shims so the mutex kind is no longer...
null
rust-lang__miri__3795
rust-lang/miri
3,795
defect
308fa90be9eaf828defbeac4c3a281843423d039
e492e32778dbfd6ee4d183e6fb943da355e5f9cb
throw_unsup_format for alignment greater than 2^29
Fixes #3687
diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs index 7f6f63ff5e7..45548d79c50 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -463,6 +463,11 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> { let size = this.read_target_usize(size)?; ...
3
3
2
[{"id": "G0", "claim": "Put the alignment check in check_rustc_alloc_request instead of the foreign-item handler so it runs on all entry points, since the current placement forgot reallocate.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add a test...
null
rust-lang__miri__3818
rust-lang/miri
3,818
defect
78880562c6ba6d1577d946cb3221d001d5ebfccd
4f0c2810baab7a54ed0d0fcfc503541d4b9aeedb
epoll: iterate through output buffer then fetch an event from ready list
Fixes #3812
diff --git a/src/shims/unix/linux/epoll.rs b/src/shims/unix/linux/epoll.rs index d529a9b63e6..4b7226a31cc 100644 --- a/src/shims/unix/linux/epoll.rs +++ b/src/shims/unix/linux/epoll.rs @@ -411,12 +411,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let mut num_of_events: i32 = 0; ...
3
3
1
[{"id": "G0", "claim": "Iterating the output array while unconditionally popping from the ready list produces empty entries whenever an FD was already closed, so the code needs to loop fetching the next entry from the ready list that refers to an FD that is still open and exit only when an entry is actually written.", ...
null
rust-lang__miri__3824
rust-lang/miri
3,824
defect
f6a68eee84bab73bb4d49628936c788bd2873ab9
c19b1fee1b65debb52d57b7ad5367e6fc7774104
Set EINVAL for epoll_wait maxevent value 0
Fixes #3821
diff --git a/src/shims/unix/linux/epoll.rs b/src/shims/unix/linux/epoll.rs index 127817d5bbe..c69a2ac216e 100644 --- a/src/shims/unix/linux/epoll.rs +++ b/src/shims/unix/linux/epoll.rs @@ -409,11 +409,12 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { )?; let timeout = this.read_scal...
1
1
1
[{"id": "G0", "claim": "The `maxevents.try_into().unwrap()` above needs to be moved down after the `epfd <= 0 || maxevents <= 0` check, otherwise it would ICE on a negative `maxevents`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__miri__3856
rust-lang/miri
3,856
defect
d7d6b8c8a1f9860ada01960717b38019b52cd1ab
11ea60a4923a23ddee388407b6e4bb6431c0d18b
Enable native libraries on macOS
Fixes #3595 by using `-fvisibility=hidden` and the visibility attribute supported by both gcc and clang rather than the previous gcc-only mechanism for symbol hiding. Also brings over cfg changes from #3594 which enable native-lib functionality on all unixes. Thanks for taking a look, feedback very welcome! cc @R...
diff --git a/Cargo.toml b/Cargo.toml index 4b7f3483ff7..d8cfa5b886d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,8 +37,6 @@ features = ['unprefixed_malloc_on_supported_platforms'] [target.'cfg(unix)'.dependencies] libc = "0.2" - -[target.'cfg(target_os = "linux")'.dependencies] libffi = "3.2.0" libloading = "0...
7
6
0
[{"id": "G0", "claim": "The tests mark their target scope with `@ignore-target-windows` plus `@ignore-target-wasm` because ui_test has no `@only-target-unix` directive, and the author asks whether that is a reasonable replacement.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {...
null
rust-lang__miri__3884
rust-lang/miri
3,884
defect
11da987f4c7aa7ec56287c98410d6f020488ba34
62cff3820c3baca4de95866914d0d312968f9e37
detect when pthread_cond_t is moved
Closes #3749
diff --git a/src/concurrency/sync.rs b/src/concurrency/sync.rs index 7098cc5b95b..1f910d885ca 100644 --- a/src/concurrency/sync.rs +++ b/src/concurrency/sync.rs @@ -134,6 +134,9 @@ struct Condvar { /// Contains the clock of the last thread to /// perform a condvar-signal. clock: VClock, + + /// Additi...
2
2
1
[{"id": "G0", "claim": "Please store the cond's clock id in AdditionalCondData instead of in-memory, similar to what was done with the mutex kind.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "In pthread_cond_destroy the pre-existing duplicate cond_get_...
null
rust-lang__miri__3891
rust-lang/miri
3,891
defect
d6e68b15d6dc47a9dd990718a35567c25f3b7284
f7901559b6cd211767056c3971952677f9d1f337
Fix tokio test ICE
Fixes #3858 It turned out that the issue mentioned [here](https://github.com/rust-lang/miri/issues/3858#issuecomment-2336726299) is the exact cause of ICE. So in this PR, I changed the type of ``EpollEventInterest::epfd`` from ``i32`` to ``WeakFileDescriptionRef``.
diff --git a/src/shims/unix/linux/epoll.rs b/src/shims/unix/linux/epoll.rs index d91ce45e101..051d3188791 100644 --- a/src/shims/unix/linux/epoll.rs +++ b/src/shims/unix/linux/epoll.rs @@ -61,8 +61,8 @@ pub struct EpollEventInterest { data: u64, /// Ready list of the epoll instance under which this EpollEvent...
4
4
1
[{"id": "G0", "claim": "The fd_num field of EpollEventInterest needs a comment justifying why a file descriptor number is stored there instead of a proper reference, stating what it is used for and that it must never be dereferenced inside Miri.", "category": "maintainability", "verdict": "supported", "priority": "P2",...
null
rust-lang__miri__3910
rust-lang/miri
3,910
defect
894c264f38edd93c15eb38f7a03c028fdc53dbb3
ae3ff3b311b4b7fa26b19e50ca6c15a813ade1fe
Android: Fixed tests for libc time API
Closes #3888. There's nothing to do, really. All of the API is already supported by `miri`, but I just tweaked tests a bit to match the data structures and functions from `bionic`.
diff --git a/ci/ci.sh b/ci/ci.sh index c7be71662bd..81fc5b299ba 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -154,7 +154,7 @@ case $HOST_TARGET in TEST_TARGET=i686-unknown-freebsd run_tests_minimal $BASIC $UNIX threadname pthread time fs TEST_TARGET=x86_64-unknown-illumos run_tests_minimal $BASIC $UNIX thread sy...
2
1
0
[{"id": "G0", "claim": "Since the clock match arm now also applies to Android, the comment above it should be updated to say \"Linux, Android, and FreeBSD\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The author proposes checking all Linux-spe...
null
rust-lang__miri__3918
rust-lang/miri
3,918
defect
36ae133d0d95280864aaf7cb1b111dc86dc7ea99
a73d8b72e163a1cd0a2d16629585b7d02a7466cc
implements arc4random_buf shim for freebsd/solarish platforms.
close #3914
diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index c06ce57e610..470f13442f9 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -792,6 +792,20 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.gen_random(ptr, len)?...
3
3
2
[{"id": "G0", "claim": "The test calls libc::arc4random_buf, which the libc crate does not appear to provide on Solarish targets, so the test will not compile there; copy what std does and declare the function locally instead.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}...
null
rust-lang__miri__3946
rust-lang/miri
3,946
defect
d746eee1b0cdd98656b5d50730ef89247283dfb8
1f1fbb52b1af4523ee986b4b5830c4877fce00a5
Fix over synchronization of epoll
Fixes #3944. The clock used by epoll is now per event generated, rather than by the `epoll's` ready_list. The same epoll tests that existed before are unchanged and still pass. Also the `tokio` test case we had worked on last week still passes with this change. This change does beg the question of how the epol...
diff --git a/src/shims/unix/linux/epoll.rs b/src/shims/unix/linux/epoll.rs index b57347abffa..a27db477eb5 100644 --- a/src/shims/unix/linux/epoll.rs +++ b/src/shims/unix/linux/epoll.rs @@ -29,14 +29,17 @@ struct Epoll { #[derive(Debug)] pub struct EpollEventInstance { /// Xor-ed event types that happened to the ...
8
7
1
[{"id": "G1", "claim": "The pull request should not change unnamed_socket.rs at all; the logic belongs in epoll.rs doing a release_clock() when adding an event to the ready list.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G3", "claim": "The clock field could also b...
null
rust-lang__miri__3960
rust-lang/miri
3,960
defect
6fee850a46872b39a92df4a1deb0c5a60cd60dc1
c01a4c482236ffc21c772a8aa5272b3045643a01
Pipe minor changes: diagnostics, flag support and comments
This PR: - Add the exact syscall names to the blocking not supported diagnostic - Added support for ``pipe2`` ``O_NONBLOCK`` - Fix minor comment error in ``tests/pass-dep/libc/libc-epoll-blocking.rs`` Fixes #3912
diff --git a/src/shims/unix/unnamed_socket.rs b/src/shims/unix/unnamed_socket.rs index e83c0afb287..8494dcf1ca6 100644 --- a/src/shims/unix/unnamed_socket.rs +++ b/src/shims/unix/unnamed_socket.rs @@ -163,7 +163,7 @@ impl FileDescription for AnonSocket { } else { // Blocking socket...
6
6
2
[{"id": "G0", "claim": "The extra `if flags != 0` check is unnecessary because for `flags == 0` the O_NONBLOCK test is always false.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `is_nonblock` declaration needs a comment explaining that recogni...
null
rust-lang__miri__3992
rust-lang/miri
3,992
defect
0bf92849687e4636d5689c81a1ba74f8938a8d02
34c5eab8c1f2c9d4d994d9e8aef95b2594e1e1be
Android: Added syscall support
According to the issue's description I moved the whole `syscall` implementation into a separate file, so it's a little bit more than just "thread APIs". Anyway, all of these system calls are available on Android. Closes #3618.
diff --git a/ci/ci.sh b/ci/ci.sh index 4e7cbc50ca0..0356d7ecf10 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -154,7 +154,7 @@ case $HOST_TARGET in TEST_TARGET=i686-unknown-freebsd run_tests_minimal $BASIC $UNIX time hashmap random threadname pthread fs libc-pipe TEST_TARGET=x86_64-unknown-illumos run_tests_minim...
4
2
2
[{"id": "G0", "claim": "The futex test file's name is confusing now that the test also targets Android, and the author asks whether it should be renamed (a `libc` prefix, or `linux-like` as in std).", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "E...
null
rust-lang__miri__4016
rust-lang/miri
4,016
defect
052bdcb72dda94f0ac0284304503d25de28acc6b
e466b8103a827440fcf3ba462a44b983271e9958
Added epoll and eventfd for Android
Fixes #3996. I decided not to move `check_shim` into the implementations because all these functions are no more than just shims over `syscall`. Moreover, `eventfd` is even used by the `syscall` implementation.
diff --git a/ci/ci.sh b/ci/ci.sh index 0356d7ecf10..1e5a2847c6f 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -154,7 +154,7 @@ case $HOST_TARGET in TEST_TARGET=i686-unknown-freebsd run_tests_minimal $BASIC $UNIX time hashmap random threadname pthread fs libc-pipe TEST_TARGET=x86_64-unknown-illumos run_tests_minim...
3
2
1
[{"id": "G0", "claim": "If eventfd is meant to be allowed on linux and android only, the removed target assertion should be replaced with a check that panics on any other OS instead of being dropped outright.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "clai...
null
rust-lang__miri__4136
rust-lang/miri
4,136
defect
1c87fa0eb1339b4af7324cb30fe2c820618442c3
9016eba93c0ead232c2c77fe34d6d82c7098573c
Illumos: Added epoll and eventfd
Fixes #4017.
diff --git a/src/shims/unix/solarish/foreign_items.rs b/src/shims/unix/solarish/foreign_items.rs index 98909d86c8f..3ad137934bd 100644 --- a/src/shims/unix/solarish/foreign_items.rs +++ b/src/shims/unix/solarish/foreign_items.rs @@ -3,6 +3,8 @@ use rustc_span::Symbol; use rustc_target::callconv::{Conv, FnAbi}; use ...
5
4
0
[{"id": "G0", "claim": "In tests/pass-dep/libc/libc-eventfd.rs, put the `#[cfg]` on the `test_syscall` function instead of wrapping the syscall body in a `cfg_if!` block with an empty illumos branch.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":...
null
rust-lang__miri__4181
rust-lang/miri
4,181
defect
18a657909f41ce8e5e5b17f6d5afc8ba67d753a8
d0918f11178700c4bd6fbdb46b70de597ef0ab5d
Throw ub error when invoking non-vararg shim with vararg import
Closes #4013
diff --git a/src/helpers.rs b/src/helpers.rs index a26f12cdfb1..e0e91bbbf59 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -999,6 +999,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { &'a [OpTy<'tcx>; N]: TryFrom<&'a [OpTy<'tcx>]>, { self.check_abi_and_shim_symbol_clash(ab...
2
2
1
[{"id": "G0", "claim": "The mremap shim needs to use check_shim_variadic instead of check_shim, since libc declares mremap as variadic.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "check_non_variadic is called only once, so it should be inlined at...
null
rust-lang__miri__4812
rust-lang/miri
4,812
defect
f589bbb5bb0bddb29edcdfb4cabcd16575e14b0c
b186092e69bb3009587a5acd2a3d55ef26e40cae
Support fstat on non-file-backed FDs
Implement fstat support for sockets, pipes, eventfd, epoll, and stdin/stdout/stderr file descriptors. Fixes scalar size mismatch error by using to_uint with scalar's own size instead of to_u32(). Fixes rust-lang/miri#4753
diff --git a/src/shims/unix/fs.rs b/src/shims/unix/fs.rs index f43fd3fe2d1..2eb6b2716c2 100644 --- a/src/shims/unix/fs.rs +++ b/src/shims/unix/fs.rs @@ -128,17 +128,20 @@ trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCxExt<'tcx> { let (access_sec, access_nsec) = metadata.accessed.unwrap_or((0, 0)); ...
10
10
6
[{"id": "G0", "claim": "Reading the mode Scalar with to_uint at the Scalar's own size and masking with u16::MAX, instead of reading at mode_t's target width, bypasses the sanity check that the value has mode_t's type and can mangle the st_mode/stx_mode value written back.", "category": "correctness", "verdict": "suppor...
null
rust-lang__miri__4823
rust-lang/miri
4,823
defect
04cf81ac9f3a413cfa2df9deb436b6c26e9a731c
2a028f78428b39d08a5907cdf5b396853aaab99a
Windows: Implement MoveFileExW shim
This allows `rename` to work. Doesn't support renaming to directory form yet, as that requires a form of SetFileInfo
diff --git a/src/shims/windows/foreign_items.rs b/src/shims/windows/foreign_items.rs index 0bdf6bb7850..e628e50290e 100644 --- a/src/shims/windows/foreign_items.rs +++ b/src/shims/windows/foreign_items.rs @@ -451,6 +451,16 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.SetFi...
2
2
0
[{"id": "G0", "claim": "The hard-coded flag value 1 in the MoveFileExW check is unexplained; the reviewer asks what flag value 1 means.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The throw_unsup_format! call in MoveFileExW has a stray traili...
null
rust-lang__miri__4882
rust-lang/miri
4,882
defect
69f7726fad9d29ed97aae42cfe104c819e701434
afabd909e416310f4e9e5e0f798a3927ca40feea
Add network socket `listen` and `bind` shims
Hi, This pull request adds shims for the `bind` and `listen` syscalls. To support the implementation of `TcpListener::bind` from the standard library, a small set of options for the `setsockopt` syscall are added as well. For the `bind` shim I'm a bit uncertain about the validation we should perform there. Since ...
diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index 130643ec680..28092156c72 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -550,6 +550,37 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let result = this.socket(d...
28
24
3
[{"id": "G0", "claim": "The `Bind` state variant should be named `Bound` so the state name is self-explaining.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The state variant holding the `TcpListener` should be named `Listening`.", "category": ...
null
rust-lang__miri__4892
rust-lang/miri
4,892
defect
0e44e9debae334e8f973983b101121f372ee9bfd
46ffedf94a8e99dd2d6fcb17659ed7f059a34e7d
Handle blocking I/O using Mio, add `accept` and `connect` network socket shims
Hi, This pull request adds a new blocking I/O manager to the Miri machine. This manager can be used to register blocking I/O operations using `block_thread_for_io` and unblock them once an event for this I/O source happened. To test the new non-blocking I/O, this pull request also adds support for the `accept` a...
diff --git a/Cargo.lock b/Cargo.lock index 2d332ae98dd..00a22ca56e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -431,7 +431,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -464,7 +464,7 @@ source = "registry+https://github.com/rust-la...
29
28
7
[{"id": "G0", "claim": "windows-sys is being downgraded in Cargo.lock (0.61.2 to 0.59.0) and the reviewer asks why.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc on the events field should clarify that it holds no state, it is just a re...
null
rust-lang__miri__4899
rust-lang/miri
4,899
defect
4258718a8c4c07fd53e438c1704f1b4d8112c0b4
54b255f3a08b775cf46cda4d3b712d941552eaae
Add aarch64 CRC32 intrinsic shims
Implement shims for the 8 aarch64 CRC32 LLVM intrinsics, fixing the `can't call foreign function llvm.aarch64.crc32b` error that blocks any crate depending on `crc32fast` (used by `png`, `flate2`, `image`, `zip`, etc.) from running under Miri on aarch64. **Standard CRC-32** (polynomial `0x104C11DB7`): `crc32b`, `crc32...
diff --git a/src/shims/aarch64.rs b/src/shims/aarch64.rs index d06b02a4133..b3515d8bdfa 100644 --- a/src/shims/aarch64.rs +++ b/src/shims/aarch64.rs @@ -85,6 +85,49 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_scalar(val, &this.project_index(&dest, i)?)?; ...
11
8
2
[{"id": "G0", "claim": "For the 8- and 16-bit variants the shim reads the second argument with to_u32() and truncates with `as u8`/`as u16`, which can fail on a size mismatch since the corresponding LLVM intrinsics take i8/i16; read it with to_u8()/to_u16() as the x86 SSE4.2 shim does.", "category": "correctness", "ver...
null
rust-lang__miri__4900
rust-lang/miri
4,900
defect
4080db1cfdbc244282060cf0e9a02d6da7e0ec2a
f2e22e98d7bfd75de163c5460d0ac264b029690f
Add `getsockname` shim
Hi, This pull request adds the shim for the `getsockname` syscall on UNIX targets.
diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 777e6581e1d..e0cb3d38c20 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -157,6 +157,9 @@ pub enum NonHaltingDiagnostic { /// Supported backlog value by Miri. supported: i32, }, + SocketNameRandomPort { + details: bo...
7
5
2
[{"id": "G0", "claim": "Calling `getsockname` on a socket bound to the zero-port with no underlying socket should be reported with `throw_unsup_format!` (an unsupported error) instead of a deduplicated warning that still returns the zero-port.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "...
null
rust-lang__miri__4902
rust-lang/miri
4,902
defect
b582b95eee9c3d6afdb1cb31f3adf8316de02b19
e880c954ded70903c4f7790026a25c8a91be2da1
implement sqrt and add fixme for `f128`
Trevor and I have been tracking remaining `f128` items using `FIXME(f128)`, this makes it easier to keep track. The `sqrt` function is implemented using softfloat, that already works for `f128` scalars, this just tests the simd version. I'm looking into updating `portable_simd` to expose the `f16` and `f128` vector ...
diff --git a/src/intrinsics/simd.rs b/src/intrinsics/simd.rs index 235f815ba2f..74582bc5890 100644 --- a/src/intrinsics/simd.rs +++ b/src/intrinsics/simd.rs @@ -1,4 +1,4 @@ -use rustc_apfloat::ieee::{DoubleS, HalfS, IeeeFloat, SingleS}; +use rustc_apfloat::ieee::{DoubleS, HalfS, IeeeFloat, QuadS, SingleS}; use rustc_m...
3
2
0
[{"id": "G0", "claim": "The new sqrt assertions use overloaded `*`/`sqrt()`/`abs()` operators while the rest of the test uses direct `simd_*` intrinsic calls, which is inconsistent; they should use direct `simd_*` calls.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ...
null
rust-lang__miri__4912
rust-lang/miri
4,912
defect
b582b95eee9c3d6afdb1cb31f3adf8316de02b19
1e56aaf117c05d13c3ee3fb444577c111514b8d3
aarch64: add shims for pairwise widening/wrapping addition
Combined with https://github.com/rust-lang/miri/pull/4899 this is sufficient to run the zlib-rs crc32 tests. With LLVM 23 I believe that these implementations should no longer be needed because the `stdarch` implementation can use portable intrinsics. Until then, we do need them, and the test coverage is nice regard...
diff --git a/src/shims/aarch64.rs b/src/shims/aarch64.rs index d06b02a4133..279ca2a093e 100644 --- a/src/shims/aarch64.rs +++ b/src/shims/aarch64.rs @@ -58,6 +58,94 @@ pub(super) trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.write_immediate(*res_lane, &dest)?; } ...
5
5
1
[{"id": "G0", "claim": "The comments on the two new shims should explain what the pairwise operations actually do (which elements are added to which), since \"pairwise addition\" alone tells a reader unfamiliar with ARM conventions nothing.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope...
null
rust-lang__miri__4913
rust-lang/miri
4,913
defect
273f420b71a43b55efa133d34d9e4cafae7a6b81
7222ce51d1c993589de68841219e92d548a3ec69
shims: improve Linux statx
shims/unix: improve Linux statx - Track more fields in `FileMetadata`. - Populate these new fields in the `statx` shim and update the returned mask. - Implement `linux_decode_dev` helper to split `dev_t` using glibc / musl layout (initially, now removed) - Add an integration test in `tests...
diff --git a/src/shims/unix/fs.rs b/src/shims/unix/fs.rs index 9873af85b98..ffa0714cd81 100644 --- a/src/shims/unix/fs.rs +++ b/src/shims/unix/fs.rs @@ -219,6 +219,22 @@ fn maybe_sync_file( impl<'tcx> EvalContextExtPrivate<'tcx> for crate::MiriInterpCx<'tcx> {} trait EvalContextExtPrivate<'tcx>: crate::MiriInterpCx...
2
2
2
[{"id": "G0", "claim": "The statx shim assumes every FileMetadata constructed on a unix host has all the enriched fields; instead FileMetadata should know which fields are present (and the assumption should be documented), so the mask only advertises fields that are real.", "category": "design", "verdict": "supported",...
null
rust-lang__miri__4916
rust-lang/miri
4,916
defect
ef444b33426c326cdb216da335ca9224b77f19e9
b1140b5c3aa184cfd29cbe7a082480907647e355
Add `getpeername` socket shim
Hi, This pull request adds the shim for the `getpeername` syscall for TCP sockets. It's pretty much the same as the `getsockname` shim.
diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index f2e16e75892..471a91515d8 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -633,6 +633,16 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let result = this.getsockn...
1
1
0
[{"id": "G0", "claim": "The added tests use a 10ms thread::sleep to yield to the server thread so that accept is called before connect, which the reviewer questions as unnecessary since the test is about getpeername, not about blocking accept/connect.", "category": "testing", "verdict": "supported", "priority": "P2", "...
null
rust-lang__miri__4917
rust-lang/miri
4,917
defect
6530e8150059e7739fdde6146b3f62aec91e8044
7dd466cce5498668ef9bfa8338b1f7fb716fcd57
Add network socket `read`/`recv` and `write`/`send` shims
Hi, This pull request adds shims for the `read`/`recv` and `write`/`send` syscalls for TCP sockets.
diff --git a/src/shims/files.rs b/src/shims/files.rs index 694a5922b79..96914843b88 100644 --- a/src/shims/files.rs +++ b/src/shims/files.rs @@ -596,7 +596,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } } - /// Write data to a host `Write` type, withthe bytes taken from machine...
6
5
1
[{"id": "G0", "claim": "The `let socket = self;` binding at the top of `Socket::read` serves no purpose and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The fd-lookup, downcast and connected-state check logic is duplicated b...
null
rust-lang__miri__4934
rust-lang/miri
4,934
defect
19585c05d5b32a85cc648749e3ac41d20cf00c65
1f0464745bc936f1dac82f597babce57ca12d952
Add `stat` and `lstat` shims for all Unixes
Closes rust-lang/miri#4744 Adds `stat` and `lstat` shims for Linux, following the same approach as rust-lang/miri#4714 did for `fstat`. - Add `"stat"` and `"lstat"` arms to the generic Unix foreign items handler - Add `Os::Linux` to the supported targets in `fs.rs` for both functions - Add tests for `stat` and ...
diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index 2b366b69906..f0834737867 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -344,6 +344,16 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let result = this.fstat(fd...
1
1
0
[{"id": "G0", "claim": "The stat field-checking code repeated across the new tests should be moved into a shared function instead of being duplicated.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__miri__4950
rust-lang/miri
4,950
defect
93e8b8a0d9fa97e0b572a0c4c2c88ee798cc30e6
2fc9a286a2d7be804cffca73cc03386dca8622f6
Fix panic when multiple threads block on same fd
Hi, I noticed that the implementation how the blocking I/O manager registered sources to the poll was flawed. When multiple threads were to block on the same socket, we would add the socket with different tokens to the poll. Since epoll still uses the fd as identifier for the interest entries, this would be an att...
diff --git a/src/concurrency/blocking_io.rs b/src/concurrency/blocking_io.rs index 221d0495cd..4904d53c09 100644 --- a/src/concurrency/blocking_io.rs +++ b/src/concurrency/blocking_io.rs @@ -5,6 +5,7 @@ use mio::event::Source; use mio::{Events, Interest, Poll, Token}; use rustc_data_structures::fx::FxHashMap; +use ...
10
10
5
[{"id": "G0", "claim": "Remove the per-interest-kind filtering of poll results, since spurious wakeups are allowed anyway and the hand-written check of each interest kind will go subtly wrong if one kind is forgotten.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": ...
null
rust-lang__miri__4956
rust-lang/miri
4,956
defect
0722600f188a328d457eeb8608103bbbbd57b682
400f5c23157cfe696c918cb186f7a1ebf11f9c6f
GenMC: Don't split up non-atomic accesses to smaller chunks
GenMC is now able to handle larger and mixed-size non-atomic accesses. (Follow up on rust-lang/miri#4949). This deals with one of the checkmarks in https://github.com/rust-lang/miri/issues/4572. r? @RalfJung
diff --git a/src/concurrency/genmc/helper.rs b/src/concurrency/genmc/helper.rs index f539e783fd3..e2b4c261c4f 100644 --- a/src/concurrency/genmc/helper.rs +++ b/src/concurrency/genmc/helper.rs @@ -4,7 +4,6 @@ use rustc_const_eval::interpret::{InterpResult, interp_ok}; use rustc_middle::mir; use rustc_middle::mir::int...
2
1
1
[{"id": "G0", "claim": "The new test tests/genmc/pass/atomics/u64_as_u32_array.rs does not turn on GenMC mode, so it does not exercise the behaviour this PR sets out to test.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Maybe the test runner should se...
null
rust-lang__miri__4963
rust-lang/miri
4,963
defect
0a272829b77a88fa85a5a3a8d9f0eeda793687c2
045adf10fef4a1b7c1ad50ac40eb3d16fc01b93a
Implement `_mm512_permutex2var_epi64` shim
This implements the `_mm512_permutex2var_epi64` intrinsic, which is `vpermi2var.q.512`, which permutes 64-bit elements from two input vectors according to an index vector, producing a destination vector.
diff --git a/src/shims/x86/avx512.rs b/src/shims/x86/avx512.rs index fe4adf971c0..ebfd3c83034 100644 --- a/src/shims/x86/avx512.rs +++ b/src/shims/x86/avx512.rs @@ -3,7 +3,9 @@ use rustc_middle::ty::Ty; use rustc_span::Symbol; use rustc_target::callconv::FnAbi; -use super::{packssdw, packsswb, packusdw, packuswb, p...
3
3
0
[{"id": "G0", "claim": "The `permute2` function's name is not self-explaining; the doc comment should make clear why the function has that name.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment does not say whether the remaining hi...
null
rust-lang__miri__4973
rust-lang/miri
4,973
defect
98cb1d3d48fa7c8e97994050bfd69e8f3da2a1a7
ebd1e70fd918a47595119942173b028082f9ff44
Add epoll integration for network sockets
Hi, This pull request adds integration for Miri's epoll shim to the TCP socket shim. Due to the platform specific differences of mio's poll, the blocking I/O manager had to be refactored to a high degree. Instead of having sources only registered in the poll when we're currently interested in an event, we now ha...
diff --git a/src/concurrency/blocking_io.rs b/src/concurrency/blocking_io.rs index ba1e52cd397..4aafbe71a3a 100644 --- a/src/concurrency/blocking_io.rs +++ b/src/concurrency/blocking_io.rs @@ -1,12 +1,15 @@ +use std::cell::RefMut; use std::collections::BTreeMap; use std::io; +use std::ops::BitOrAssign; use std::time...
26
26
3
[{"id": "G0", "claim": "Unless there is a concrete idea for other interest receivers, the generic InterestReceiver mechanism should be dropped and the code hard-coded to blocked threads.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The docs should ex...
null
rust-lang__miri__4984
rust-lang/miri
4,984
defect
0f80ed45fe9442b71ccb241e6d852190c72d9c77
3f8007e19b8cac3d08fb07579bde3217c58807e4
Add `getaddrinfo` and `freeaddrinfo` shims
Hi, This pull request adds shims for the `getaddrinfo` and `freeaddrinfo` syscalls. They are used by the `ToSocketAddrs` trait in the standard library to resolve hostnames to socket addresses. Because the abstraction of the standard library is very tight, we're pretty much only able to shim the exact use case of t...
diff --git a/src/machine.rs b/src/machine.rs index a59ce648985..ebc5669ea99 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -531,6 +531,10 @@ pub struct MiriMachine<'tcx> { /// The list of all EpollEventInterest. pub(crate) epoll_interests: shims::EpollInterestTable, + /// The set of allocated linked...
12
12
4
[{"id": "G0", "claim": "Because the standard library has no ErrorKinds for DNS errors, resolution failures currently surface as an unsupported error; RalfJung asks to at least return something generic, like the strerror_r shim does for unknown error kinds.", "category": "design", "verdict": "supported", "priority": "P1...
null
rust-lang__miri__4985
rust-lang/miri
4,985
defect
98cb1d3d48fa7c8e97994050bfd69e8f3da2a1a7
7b74d77d7c74a8ba5903a2bb0fc8c9ead598c6ae
Add `getsockname` shim for connecting and connected sockets
Hi, This pull request adds the `getsockname` shim for connecting and connected sockets. At the moment, we just return `0.0.0.0` in those cases but because connecting sockets are already locally bound we can just return the value from `TcpStream::local_addr`.
diff --git a/src/shims/unix/socket.rs b/src/shims/unix/socket.rs index c553cd1f70e..0d10824820e 100644 --- a/src/shims/unix/socket.rs +++ b/src/shims/unix/socket.rs @@ -975,6 +975,11 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { Ok(address) => address, Err(e...
4
3
1
[{"id": "G0", "claim": "The fallthrough `_` arm of the `getsockname` match should be replaced by a concrete pattern spelling out which states it handles.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new test's doc comment should say \"conn...
null
rust-lang__miri__4987
rust-lang/miri
4,987
defect
98cb1d3d48fa7c8e97994050bfd69e8f3da2a1a7
7bd742fde6b79f5ab883e36e7dc7957896f3d92d
Add network socket `shutdown` shim
Hi, This pull request adds the shim for the `shutdown` syscall for TCP sockets. I've ran the tokio TCP tests using Miri and noticed that many of them require `TcpStream::shutdown` so it would be nice to also have this shimmed.
diff --git a/src/shims/io_error.rs b/src/shims/io_error.rs index bb761980e6c..1039a66d99a 100644 --- a/src/shims/io_error.rs +++ b/src/shims/io_error.rs @@ -251,6 +251,18 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { fn io_error_to_errnum(&self, err: std::io::Error) -> InterpResult<'tcx, Scalar...
12
11
5
[{"id": "G0", "claim": "The special-case WSAESHUTDOWN hack in io_error_to_errnum is incorrect and unnecessary; the error should be added to the standard IO error table instead.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The WSAESHUTDOWN workaround shou...
null
rust-lang__miri__4988
rust-lang/miri
4,988
defect
6961dabc90309b36a981e56e08522a38fc405e22
9329130427ed5ccd0abeb2ad191f835ac3d1ddbf
tree borrows (implicit writes): add support for #[rustc_no_writable]
This PR enables support for the `#[rustc_no_writable]` attribute. If implicit writes checking in tree borrows is enabled, this attribute can be used to disable the checking on a per function basis. A test case has been provided to demonstrate the usage and tests that it works as intended.
diff --git a/src/borrow_tracker/tree_borrows/mod.rs b/src/borrow_tracker/tree_borrows/mod.rs index 2b4f3cada96..5de16a277be 100644 --- a/src/borrow_tracker/tree_borrows/mod.rs +++ b/src/borrow_tracker/tree_borrows/mod.rs @@ -1,4 +1,5 @@ use rustc_abi::Size; +use rustc_hir::find_attr; use rustc_middle::mir::{Mutabilit...
3
3
1
[{"id": "G0", "claim": "Make the implicit-writes flag/attribute lookup code run only when `is_protected` is true, since implicit writes only happen for protected references.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Replace the comment `// miri...
null
rust-lang__miri__5005
rust-lang/miri
5,005
defect
0f465c2ef352cba1299a8debc057c7f93cdeb3f6
8b09c4b4afb131afff857f5a37d3f63a19be825a
Add basic `getsockopt` shim for reading `SO_ERROR`
Hi, This pull request adds the `getsockopt` shim. Currently, it only supports reading the `SO_ERROR` option. By this, Miri is now able to run programs which use tokio/mio sockets. Thus, I also added a simple tokio socket test which tests connecting/accepting and reading/writing. Let me know if I should test more...
diff --git a/src/shims/unix/foreign_items.rs b/src/shims/unix/foreign_items.rs index 3a47c955278..0766352bab2 100644 --- a/src/shims/unix/foreign_items.rs +++ b/src/shims/unix/foreign_items.rs @@ -661,6 +661,17 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { this.setsockopt(socket...
12
11
5
[{"id": "G0", "claim": "The new doc comment for the stored async error is confusing and should be reworded to \"[`Some`] when the socket had an async error which has not yet been fetched via `SO_ERROR`\" instead of mentioning `take_error`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope"...
null
rust-lang__miri__5009
rust-lang/miri
5,009
defect
0f465c2ef352cba1299a8debc057c7f93cdeb3f6
2a96cd7c7cb7ca7c067f9a083fde23af1c8784f1
Remove `TcpStream::peer_addr` check for network sockets, test epoll readiness for `shutdown`
As mentioned in rust-lang/miri#5005, this pull request fixes a bug with `shutdown` and non-blocking sockets. Additionally, it also adds tests for `shutdown` in combination with `epoll`. The bug occurs when we connect a non-blocking socket and shut down the write end of the connecting socket before the socket became ...
diff --git a/src/shims/unix/socket.rs b/src/shims/unix/socket.rs index ca0ddfd4726..0d35cf7ddea 100644 --- a/src/shims/unix/socket.rs +++ b/src/shims/unix/socket.rs @@ -603,10 +603,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { } // Mio returns a potentially unconnected stream. ...
7
6
1
[{"id": "G0", "claim": "In the new comment about the peer_addr edge-case, the wording should say the write end could already be shut down rather than closed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new comment block should state explici...
null
rust-lang__miri__5015
rust-lang/miri
5,015
defect
dd8994ddd4f5dc8564353854f5ea8513aa81807f
0b5faab718187b615ba4f14f6d8477c221487277
default all unknown weak extern statics to null
Unfortunately we can't easily create a zero-filled allocation on-demand when encountering a weak extern. So instead we pre-allocate a ptr-sized null-filled allocation, and then make all ptr-sized weak externs aliases of that allocation. (Non-ptr-sized weak externs are just not supported for now.) @bjorn3 does that s...
diff --git a/src/machine.rs b/src/machine.rs index 21f50571927..d9b2c5fec52 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -17,7 +17,7 @@ use rustc_data_structures::either::Either; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; #[allow(unused)] use rustc_data_structures::static_assert_size; -use rustc_h...
1
1
0
[{"id": "G0", "claim": "The non-pointer-sized weak-symbol branch in src/machine.rs would not even typecheck, since rustc rejects non-pointer-sized extern_weak statics (E0791).", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__miri__5023
rust-lang/miri
5,023
defect
f16f68033df4650da0712ff613edb309470058b8
ff85bd94bc040af79ae5d6b6d0c721803f5c5332
Handle short reads and writes for TCP sockets
Hi, As mentioned in rust-lang/miri#5005, this pull request adds handling for short reads and writes on TCP sockets. Because short reads/writes imply an empty/full buffer on Unix hosts, we need to remove the readiness in those cases. On Windows hosts, we need to forcefully emit a new readiness event to prevent appl...
diff --git a/src/shims/unix/socket.rs b/src/shims/unix/socket.rs index 853e69c2341..7e717fcef8d 100644 --- a/src/shims/unix/socket.rs +++ b/src/shims/unix/socket.rs @@ -57,6 +57,8 @@ struct Socket { state: RefCell<SocketState>, /// Whether this fd is non-blocking or not. is_non_block: Cell<bool>, + //...
6
6
3
[{"id": "G0", "claim": "The comment where writable readiness is removed should be extended, via the proposed suggestion, to say that the next time the socket is seen writable an epoll edge will be reported.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl...
null