Skip to content

Commit 2c3147f

Browse files
authored
Rollup merge of #70958 - Amanieu:android_try_reserve, r=Mark-Simulacrum
Disable try_reserve tests on Android Calling `realloc` with large sizes seems to be broken on older Android versions that use dlmalloc as the default allocator. This is not an issue for modern Android versions that use jemalloc. Fixes #55861
2 parents 7944f39 + 7060a9e commit 2c3147f

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/liballoc/tests/string.rs

+2
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ fn test_reserve_exact() {
555555

556556
#[test]
557557
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
558+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
558559
fn test_try_reserve() {
559560
// These are the interesting cases:
560561
// * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -644,6 +645,7 @@ fn test_try_reserve() {
644645

645646
#[test]
646647
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
648+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
647649
fn test_try_reserve_exact() {
648650
// This is exactly the same as test_try_reserve with the method changed.
649651
// See that test for comments.

src/liballoc/tests/vec.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,7 @@ fn test_reserve_exact() {
11371137

11381138
#[test]
11391139
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1140+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
11401141
fn test_try_reserve() {
11411142
// These are the interesting cases:
11421143
// * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -1254,6 +1255,7 @@ fn test_try_reserve() {
12541255

12551256
#[test]
12561257
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1258+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
12571259
fn test_try_reserve_exact() {
12581260
// This is exactly the same as test_try_reserve with the method changed.
12591261
// See that test for comments.

src/liballoc/tests/vec_deque.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,7 @@ fn test_reserve_exact_2() {
11341134

11351135
#[test]
11361136
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1137+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
11371138
fn test_try_reserve() {
11381139
// These are the interesting cases:
11391140
// * exactly isize::MAX should never trigger a CapacityOverflow (can be OOM)
@@ -1248,6 +1249,7 @@ fn test_try_reserve() {
12481249

12491250
#[test]
12501251
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
1252+
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
12511253
fn test_try_reserve_exact() {
12521254
// This is exactly the same as test_try_reserve with the method changed.
12531255
// See that test for comments.

0 commit comments

Comments
 (0)