Bumpalo - add patches to fix autopkgtest failures on i386 and armhf.
Peter Michael Green
2 years ago
|
0 |
rust-bumpalo (3.7.0-3) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
|
|
1 |
|
|
2 |
* Team upload.
|
|
3 |
* Package bumpalo 3.7.0 from crates.io using debcargo 2.4.4
|
|
4 |
* Apply patch (submitted and accepted upstream) to fix alloc_slice_fill_zero
|
|
5 |
test on architectures where max alignment is only 4.
|
|
6 |
* Disable oom_instead_of_bump_pointer_overflow test, upstream has agreed with
|
|
7 |
my determination that it is the test rather than the code it tests which
|
|
8 |
is broken, but we have not yet reached consensus on how best to fix it.
|
|
9 |
see https://github.com/fitzgen/bumpalo/issues/128
|
|
10 |
|
|
11 |
-- Peter Michael Green <plugwash@debian.org> Sun, 21 Nov 2021 10:27:25 +0000
|
|
12 |
|
0 | 13 |
rust-bumpalo (3.7.0-2) unstable; urgency=medium
|
1 | 14 |
|
2 | 15 |
* Package bumpalo 3.7.0 from crates.io using debcargo 2.4.4-alpha.0
|
|
0 |
Description: Disable oom_instead_of_bump_pointer_overflow test
|
|
1 |
Upstream has agreed with my determination that it is the test rather than the
|
|
2 |
code it tests which is broken, but we have not yet reached consensus on how
|
|
3 |
best to fix it. See https://github.com/fitzgen/bumpalo/issues/128
|
|
4 |
Author: Peter Michael Green <plugwash@debian.org>
|
|
5 |
|
|
6 |
--- rust-bumpalo-3.7.0.orig/tests/tests.rs
|
|
7 |
+++ rust-bumpalo-3.7.0/tests/tests.rs
|
|
8 |
@@ -58,7 +58,7 @@ fn can_iterate_over_allocated_things() {
|
|
9 |
assert!(seen.iter().all(|s| *s));
|
|
10 |
}
|
|
11 |
|
|
12 |
-#[test]
|
|
13 |
+/*#[test]
|
|
14 |
#[should_panic(expected = "out of memory")]
|
|
15 |
fn oom_instead_of_bump_pointer_overflow() {
|
|
16 |
let bump = Bump::new();
|
|
17 |
@@ -79,7 +79,7 @@ fn oom_instead_of_bump_pointer_overflow(
|
|
18 |
|
|
19 |
// This should panic.
|
|
20 |
bump.alloc_layout(layout);
|
|
21 |
-}
|
|
22 |
+}*/
|
|
23 |
|
|
24 |
#[test]
|
|
25 |
fn force_new_chunk_fits_well() {
|
|
0 |
commit fc596a9fe19f1b79f9265f37727e2dacde63647d
|
|
1 |
Author: Peter Michael Green <plugwash@debian.org>
|
|
2 |
Date: Sat Oct 30 17:50:00 2021 +0000
|
|
3 |
|
|
4 |
Fix alloc_slice_fill_zero on architectures where "max alignment" is only 4 (such as i386)
|
|
5 |
|
|
6 |
diff --git a/tests/alloc_fill.rs b/tests/alloc_fill.rs
|
|
7 |
index 70bd84f31..e71eff253 100644
|
|
8 |
--- a/tests/alloc_fill.rs
|
|
9 |
+++ b/tests/alloc_fill.rs
|
|
10 |
@@ -1,5 +1,7 @@
|
|
11 |
use bumpalo::Bump;
|
|
12 |
use std::alloc::Layout;
|
|
13 |
+use std::mem;
|
|
14 |
+use std::cmp;
|
|
15 |
|
|
16 |
#[test]
|
|
17 |
fn alloc_slice_fill_zero() {
|
|
18 |
@@ -17,7 +19,8 @@ fn alloc_slice_fill_zero() {
|
|
19 |
b.alloc_slice_fill_clone(0, &"hello".to_string());
|
|
20 |
b.alloc_slice_fill_default::<String>(0);
|
|
21 |
let ptr2 = b.alloc(MyZeroSizedType);
|
|
22 |
- assert_eq!(ptr1.as_ptr() as usize & !7, ptr2 as *mut _ as usize);
|
|
23 |
+ let alignment = cmp::max(mem::align_of::<u64>(),mem::align_of::<String>());
|
|
24 |
+ assert_eq!(ptr1.as_ptr() as usize & !(alignment - 1), ptr2 as *mut _ as usize);
|
|
25 |
|
|
26 |
let ptr3 = b.alloc_layout(layout);
|
|
27 |
assert_eq!(ptr2 as *mut _ as usize, ptr3.as_ptr() as usize + 1);
|
0 | 0 |
remove-benchmark.diff
|
|
1 |
fix-alloc-slice-fill-zero.patch
|
|
2 |
disable-oom-instead-of-bump-pointer-overflow.patch
|