Skip to content

Commit 4024dfa

Browse files
author
Arthur Komatsu
committed
test: skip sub-page granularity smoke test under miri
Mirrors the cfg(not(miri)) attribute already applied to the equivalent internal test in src/dlmalloc.rs. With 32-byte granularity, chunks pack tightly enough to hit small-bin unlink paths that trip dlmalloc-rs's pre-existing Stacked Borrows quirk with self-aliasing in smallbins.
1 parent a6ed4db commit 4024dfa

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/smoke.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ fn configurable_api_smoke() {
7676
// so this primarily exercises the dlmalloc-side accounting; on the
7777
// embedded targets this PR is motivated by, it also packs allocations
7878
// tightly into the application heap.
79+
// Skipped under miri: with 32-byte granularity, chunks are packed tightly
80+
// enough that small-bin unlink paths get exercised in a way that trips
81+
// dlmalloc-rs's pre-existing Stacked Borrows quirk with `smallbins`
82+
// self-aliasing (the internal `custom_sub_page_granularity_alloc_free`
83+
// test in `src/dlmalloc.rs` is skipped for the same reason).
7984
#[test]
85+
#[cfg(not(miri))]
8086
fn sub_page_granularity_alloc_free() {
8187
let sub_page = 4 * core::mem::size_of::<usize>();
8288
let mut a = Dlmalloc::new_with_config(sub_page, 4095);

0 commit comments

Comments
 (0)