From b44c6680f1a3eec59cce1734450b5925735557a4 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 25 Sep 2019 04:18:23 +0000 Subject: [PATCH] Fix bug introduced in previous commit (rev 1.402) of this file: The js_finalize_queue() is eventually called when garbage is collected and js_finalize_queue() calls msgQueueDetach(), so bg-load()s did not "leak" semaphores and this "fix" actually introduced a problem where the queue was detached too many times, leaving the ref count 0 while there was actually a lingering reference (in the parent), leading to a crash as reported by echto (thanks, echto!). --- src/sbbs3/js_global.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c index 5f9f46073f..c6c8929aca 100644 --- a/src/sbbs3/js_global.c +++ b/src/sbbs3/js_global.c @@ -151,7 +151,6 @@ static void background_thread(void* arg) jsrt_Release(bg->runtime); sem_post(bg->sem); - msgQueueDetach(bg->msg_queue); free(bg); } -- GitLab