diff --git a/src/trivia/util.h b/src/trivia/util.h
index 5dad68ea52dbbab490ee23b9c52e96f8cd44f959..bf4f04e60bc36f757ec275cf93641498feac6a3b 100644
--- a/src/trivia/util.h
+++ b/src/trivia/util.h
@@ -799,6 +799,13 @@ var##_assert_type(void)							\
 	(void)p;							\
 }
 
+/** Like assert() but evaluates the given expression even if NDEBUG is set. */
+#ifndef NDEBUG
+# define VERIFY(expr) assert(expr)
+#else
+# define VERIFY(expr) ((void)(expr))
+#endif
+
 #ifndef NDEBUG
 /**
  * Execute a CPU instruction that results in the SIGILL signal.