`detail::Futex` wants 4 bytes but MicroLock only gives you one
[folly.git] / folly / test / SmallLocksTest.cpp
index ad6a83785ace8020e1c93114d8e22af511b6b06e..5aef9ea175debcba09864226d995041e8e5a0079 100644 (file)
@@ -181,7 +181,12 @@ TEST(SmallLocks, RegClobber) {
 }
 
 FOLLY_PACK_PUSH
+#if defined(__SANITIZE_ADDRESS__) && !defined(__clang__) && \
+    (defined(__GNUC__) || defined(__GNUG__))
+static_assert(sizeof(MicroLock) == 4, "Size check failed");
+#else
 static_assert(sizeof(MicroLock) == 1, "Size check failed");
+#endif
 FOLLY_PACK_POP
 
 namespace {