File 1084-Asserts-in-find_next_timeout.patch of Package erlang

From de452ace18b7e21018fdbcdfc92299e4754b7977 Mon Sep 17 00:00:00 2001
From: Rickard Green <rickard@erlang.org>
Date: Fri, 17 Jul 2020 15:17:04 +0200
Subject: [PATCH] Asserts in find_next_timeout

---
 erts/emulator/beam/time.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/erts/emulator/beam/time.c b/erts/emulator/beam/time.c
index 97f58f4e31..d054a81cd7 100644
--- a/erts/emulator/beam/time.c
+++ b/erts/emulator/beam/time.c
@@ -195,6 +195,9 @@
 #if 0
 #  define ERTS_TW_HARD_DEBUG
 #endif
+#if 0
+#  define ERTS_TW_DEBUG
+#endif
 
 #if defined(ERTS_TW_HARD_DEBUG) && !defined(ERTS_TW_DEBUG)
 #  define ERTS_TW_DEBUG
@@ -480,6 +483,8 @@ find_next_timeout(ErtsSchedulerData *esdp, ErtsTimerWheel *tiw)
 
     ERTS_HARD_DBG_CHK_WHEELS(tiw, 0);
 
+    ERTS_TW_ASSERT(tiw->at_once.nto == 0);
+    ERTS_TW_ASSERT(tiw->nto == tiw->soon.nto + tiw->later.nto);
     ERTS_TW_ASSERT(tiw->yield_slot == ERTS_TW_SLOT_INACTIVE);
 
     if (tiw->nto == 0) { /* no timeouts in wheel */
-- 
2.26.2

openSUSE Build Service is sponsored by