Skip to content

Commit

Permalink
Cleanup attributes in alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross35 committed Oct 6, 2023
1 parent a2ea0ff commit b44c6ee
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions rust-src-san.diff
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs
index cd3648214a4..c16d3451da5 100644
--- a/library/alloc/src/lib.rs
+++ b/library/alloc/src/lib.rs
@@ -138,6 +138,7 @@
#![feature(maybe_uninit_slice)]
#![feature(maybe_uninit_uninit_array)]
#![feature(maybe_uninit_uninit_array_transpose)]
+#![feature(no_sanitize)]
#![feature(pattern)]
#![feature(pointer_byte_offsets)]
#![feature(ptr_addr_eq)]
diff --git a/library/alloc/tests/vec.rs b/library/alloc/tests/vec.rs
index d44dcfbf673..cfa668c28e5 100644
index d44dcfbf673..386865df6a5 100644
--- a/library/alloc/tests/vec.rs
+++ b/library/alloc/tests/vec.rs
@@ -1636,6 +1636,8 @@ fn test_reserve_exact() {
}

#[test]
+// ASAN throws an error for requesting max allocation size
+#[cfg_attr(any(sanitzer = "memory", sanitizer = "address"), no_sanitize)]
+#[no_sanitize(address, memory, leak)]
#[cfg_attr(miri, ignore)] // Miri does not support signalling OOM
#[cfg_attr(target_os = "android", ignore)] // Android used in CI has a broken dlmalloc
fn test_try_reserve() {
Expand Down

0 comments on commit b44c6ee

Please sign in to comment.