Petr Hosek would like Owners Override to review this change authored by Leonard Chan.
[power] Add hwasan suppressions where there's existing asan suppressions
These have suppressions primarily for lsan, so they should also have the hwasan suppressions which come with lsan by default.
diff --git a/src/connectivity/wlan/lib/common/rust/src/test_utils/fake_stas.rs b/src/connectivity/wlan/lib/common/rust/src/test_utils/fake_stas.rs
index 822a8d4..311b908 100644
--- a/src/connectivity/wlan/lib/common/rust/src/test_utils/fake_stas.rs
+++ b/src/connectivity/wlan/lib/common/rust/src/test_utils/fake_stas.rs
@@ -695,6 +695,7 @@
#[should_panic(expected = "Personal is not supported")]
// TODO(https://fxbug.dev/42169733): LeakSanitizer flags leaks caused by panic.
#[cfg_attr(feature = "variant_asan", ignore)]
+ #[cfg_attr(feature = "variant_hwasan", ignore)]
fn unsupported_bss_type() {
fake_fidl_bss_description!(Open, bss_type: fidl_common::BssType::Personal);
}
diff --git a/src/lib/fuchsia-async/src/runtime/mod.rs b/src/lib/fuchsia-async/src/runtime/mod.rs
index 30c7975..6dac358 100644
--- a/src/lib/fuchsia-async/src/runtime/mod.rs
+++ b/src/lib/fuchsia-async/src/runtime/mod.rs
@@ -263,6 +263,7 @@
#[should_panic]
// TODO(https://fxbug.dev/42169733): delete the below
#[cfg_attr(feature = "variant_asan", ignore)]
+ #[cfg_attr(feature = "variant_hwasan", ignore)]
fn unblock_fn_panics() {
run(async move {
unblock(|| panic!("bad")).await;
diff --git a/src/lib/fuchsia/src/lib.rs b/src/lib/fuchsia/src/lib.rs
index eea770a..fecf1cb 100644
--- a/src/lib/fuchsia/src/lib.rs
+++ b/src/lib/fuchsia/src/lib.rs
@@ -341,11 +341,11 @@
// are targeting is lsan (LeakSanitizer), which is enabled as part of the asan variant.
#[doc(hidden)]
-#[cfg(not(feature = "variant_asan"))]
+#[cfg(not(any(feature = "variant_asan", feature = "variant_hwasan")))]
pub fn disable_lsan_for_should_panic() {}
#[doc(hidden)]
-#[cfg(feature = "variant_asan")]
+#[cfg(any(feature = "variant_asan", feature = "variant_hwasan"))]
pub fn disable_lsan_for_should_panic() {
extern "C" {
fn __lsan_disable();
@@ -355,10 +355,10 @@
}
}
-#[cfg(not(feature = "variant_asan"))]
+#[cfg(not(any(feature = "variant_asan", feature = "variant_hwasan")))]
fn install_lsan_hook() {}
-#[cfg(feature = "variant_asan")]
+#[cfg(any(feature = "variant_asan", feature = "variant_hwasan"))]
fn install_lsan_hook() {
extern "C" {
fn __lsan_do_leak_check();
diff --git a/src/power/cpu-manager/src/test/mock_node.rs b/src/power/cpu-manager/src/test/mock_node.rs
index 305bdfe..3f84859 100644
--- a/src/power/cpu-manager/src/test/mock_node.rs
+++ b/src/power/cpu-manager/src/test/mock_node.rs
@@ -266,6 +266,7 @@
#[should_panic(expected = "Mock node(s) were leaked: MockNode")]
// TODO(fxbug.dev/42169733): delete the below
#[cfg_attr(feature = "variant_asan", ignore)]
+ #[cfg_attr(feature = "variant_hwasan", ignore)]
fn test_leaked_node_panic() {
let _node = {
let mut mock_maker = MockNodeMaker::new();
diff --git a/src/power/power-manager/src/test/mock_node.rs b/src/power/power-manager/src/test/mock_node.rs
index ba025ff..d1fa8c1 100644
--- a/src/power/power-manager/src/test/mock_node.rs
+++ b/src/power/power-manager/src/test/mock_node.rs
@@ -270,6 +270,7 @@
#[should_panic(expected = "Mock node(s) were leaked: MockNode")]
// TODO(https://fxbug.dev/42169733): delete the below
#[cfg_attr(feature = "variant_asan", ignore)]
+ #[cfg_attr(feature = "variant_hwasan", ignore)]
fn test_leaked_node_panic() {
let _node = {
let mut mock_maker = MockNodeMaker::new();
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
These have suppressions primarily for lsan, so they should also have the hwasan suppressions which come with lsan by default.
The changed code seems to be checking for asan, not lsan. Does our asan configuration also include lsan by default?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
These have suppressions primarily for lsan, so they should also have the hwasan suppressions which come with lsan by default.
The changed code seems to be checking for asan, not lsan. Does our asan configuration also include lsan by default?
LSan is brought in by default with asan, but there's no compile-time check for lsan because lsan doesn't require any sanitizer instrumentation. In practice we use lsan whenever compiling with either asan or hwasan hence all the asan/hwasan-specific suppressions.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
These have suppressions primarily for lsan, so they should also have the hwasan suppressions which come with lsan by default.
Leonard ChanThe changed code seems to be checking for asan, not lsan. Does our asan configuration also include lsan by default?
LSan is brought in by default with asan, but there's no compile-time check for lsan because lsan doesn't require any sanitizer instrumentation. In practice we use lsan whenever compiling with either asan or hwasan hence all the asan/hwasan-specific suppressions.
Acknowledged
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[power] Add hwasan suppressions where there's existing asan suppressions
These have suppressions primarily for lsan, so they should also have the hwasan suppressions which come with lsan by default.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Change has been successfully rolled: https://turquoise-internal-review.googlesource.com/1040165
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |