Skip to content

Commit dcae9fe

Browse files
carolynzechgitbot
and
gitbot
authored
Update subtree to 2025-02-11 (#259)
**Do not merge this PR** -- it is just meant for reviews and a CI check, and then we'll push to main directly instead. Some callouts: - The changes to `const_ptr`, `mut_ptr`, and `nonnull` are necessary because model-checking/kani#3755 introduced a Kani model for `offset`, which expanded the range of UB that Kani can catch. It also introduced these failures under the "safety check" label, which is not affected by `#{should_panic]`. These updates exposed issues with the existing contracts and proofs (most notably for ZSTs) which are fixed here. - A few of the proofs are still failing because of bug(s) in Kani's function contracts. See model-checking/kani#3905 for a tracking issue. For now, they're commented out with a FIXME tag. Note that the VeriFast failures are expected, since part of its CI job checks if its proofs are up-to-date with the most recent version of the library, and the subtree update makes it so that's not the case. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Co-authored-by: gitbot <git@bot>
1 parent eef04d8 commit dcae9fe

File tree

646 files changed

+17927
-9499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

646 files changed

+17927
-9499
lines changed

library/Cargo.lock

+26-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ resolver = "1"
33
members = [
44
"std",
55
"sysroot",
6+
"coretests",
67
]
78

89
exclude = [
@@ -32,7 +33,7 @@ codegen-units = 10000
3233
[profile.release.package]
3334
addr2line.debug = 0
3435
addr2line.opt-level = "s"
35-
adler.debug = 0
36+
adler2.debug = 0
3637
gimli.debug = 0
3738
gimli.opt-level = "s"
3839
miniz_oxide.debug = 0

library/alloc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2021"
1010

1111
[dependencies]
1212
core = { path = "../core" }
13-
compiler_builtins = { version = "=0.1.138", features = ['rustc-dep-of-std'] }
13+
compiler_builtins = { version = "=0.1.145", features = ['rustc-dep-of-std'] }
1414
safety = { path = "../contracts/safety" }
1515

1616
[dev-dependencies]

library/alloc/benches/btree/map.rs

+1
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ pub fn iter_10k(b: &mut Bencher) {
353353
}
354354

355355
#[bench]
356+
#[cfg_attr(target_os = "emscripten", ignore)] // hits an OOM
356357
pub fn iter_1m(b: &mut Bencher) {
357358
bench_iter(b, 1_000, 1_000_000);
358359
}

library/alloc/benches/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#![feature(iter_next_chunk)]
55
#![feature(repr_simd)]
66
#![feature(slice_partition_dedup)]
7-
#![cfg_attr(bootstrap, feature(strict_provenance))]
8-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
7+
#![feature(strict_provenance_lints)]
98
#![feature(test)]
109
#![deny(fuzzy_provenance_casts)]
1110

library/alloc/benches/slice.rs

+11
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,25 @@ rotate!(rotate_medium_half, gen_random, 9158, 9158 / 2);
366366
rotate!(rotate_medium_half_plus_one, gen_random, 9158, 9158 / 2 + 1);
367367

368368
// Intended to use more RAM than the machine has cache
369+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
369370
rotate!(rotate_huge_by1, gen_random, 5 * 1024 * 1024, 1);
371+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
370372
rotate!(rotate_huge_by9199_u64, gen_random, 5 * 1024 * 1024, 9199);
373+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
371374
rotate!(rotate_huge_by9199_bytes, gen_random_bytes, 5 * 1024 * 1024, 9199);
375+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
372376
rotate!(rotate_huge_by9199_strings, gen_strings, 5 * 1024 * 1024, 9199);
377+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
373378
rotate!(rotate_huge_by9199_big, gen_big_random, 5 * 1024 * 1024, 9199);
379+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
374380
rotate!(rotate_huge_by1234577_u64, gen_random, 5 * 1024 * 1024, 1234577);
381+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
375382
rotate!(rotate_huge_by1234577_bytes, gen_random_bytes, 5 * 1024 * 1024, 1234577);
383+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
376384
rotate!(rotate_huge_by1234577_strings, gen_strings, 5 * 1024 * 1024, 1234577);
385+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
377386
rotate!(rotate_huge_by1234577_big, gen_big_random, 5 * 1024 * 1024, 1234577);
387+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
378388
rotate!(rotate_huge_half, gen_random, 5 * 1024 * 1024, 5 * 1024 * 1024 / 2);
389+
#[cfg(not(target_os = "emscripten"))] // hits an OOM
379390
rotate!(rotate_huge_half_plus_one, gen_random, 5 * 1024 * 1024, 5 * 1024 * 1024 / 2 + 1);

library/alloc/benches/vec.rs

+5
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,11 @@ fn bench_in_place_collect_droppable(b: &mut Bencher) {
547547
})
548548
}
549549

550+
// node.js gives out of memory error to use with length 1_100_000
551+
#[cfg(target_os = "emscripten")]
552+
const LEN: usize = 4096;
553+
554+
#[cfg(not(target_os = "emscripten"))]
550555
const LEN: usize = 16384;
551556

552557
#[bench]

library/alloc/src/alloc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ use core::hint;
1010
#[cfg(not(test))]
1111
use core::ptr::{self, NonNull};
1212

13-
#[cfg(test)]
14-
mod tests;
15-
1613
extern "Rust" {
1714
// These are the magic symbols to call the global allocator. rustc generates
1815
// them to call `__rg_alloc` etc. if there is a `#[global_allocator]` attribute
@@ -342,7 +339,7 @@ unsafe impl Allocator for Global {
342339
}
343340
}
344341

345-
/// The allocator for unique pointers.
342+
/// The allocator for `Box`.
346343
#[cfg(all(not(no_global_oom_handling), not(test)))]
347344
#[lang = "exchange_malloc"]
348345
#[inline]

0 commit comments

Comments
 (0)