diff --git a/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h b/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h index c65f2d003b..5b6bbe3dad 100644 --- a/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h +++ b/wpiutil/src/main/native/include/wpi/sendable/SendableHelper.h @@ -26,13 +26,22 @@ class SendableHelper { SendableHelper(const SendableHelper& rhs) = default; SendableHelper& operator=(const SendableHelper& rhs) = default; +#if !defined(_MSC_VER) && (defined(__llvm__) || __GNUC__ > 7) + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1442819 + __attribute__((no_sanitize("vptr"))) +#endif SendableHelper(SendableHelper&& rhs) { // it is safe to call Move() multiple times with the same rhs SendableRegistry::Move(static_cast(this), static_cast(&rhs)); } - SendableHelper& operator=(SendableHelper&& rhs) { +#if !defined(_MSC_VER) && (defined(__llvm__) || __GNUC__ > 7) + // See https://bugzilla.mozilla.org/show_bug.cgi?id=1442819 + __attribute__((no_sanitize("vptr"))) +#endif + SendableHelper& + operator=(SendableHelper&& rhs) { // it is safe to call Move() multiple times with the same rhs SendableRegistry::Move(static_cast(this), static_cast(&rhs));