From 6386583c1c55fd4dd70b8a820e50100bfce61fad Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 15 Jan 2010 22:06:51 +0100 Subject: [PATCH] Fix lwpReschedule()'s assertion "have runnable thread" If there is no runnable thread, we're deadlocked. lwpReschedule() has an assertion to catch this. But it didn't work, and the code following it would crash then. Can't actually happen, because the EventHandler thread is always runnable. Spotted by the Clang Static Analyzer. --- src/lib/lwp/lwp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/lwp/lwp.c b/src/lib/lwp/lwp.c index 8189450ac..83bbe1690 100644 --- a/src/lib/lwp/lwp.c +++ b/src/lib/lwp/lwp.c @@ -103,7 +103,7 @@ lwpReschedule(void) if (nextp) break; } - if (CANT_HAPPEN(!LwpCurrent && !nextp)) + if (CANT_HAPPEN(!nextp)) abort(); if (LwpCurrent != nextp) { struct lwpProc *oldp = LwpCurrent; -- 2.43.0