From 5e4de2dfd13a0aa2adda3ba6b9ab38380d009b69 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Fri, 2 Oct 2020 12:30:11 +0000 Subject: [PATCH] Initialize APPDATA.{fd,bk}_ev fields for kernel threads. This prevents crash in event.inc:RemoveEventTo because of zero pointer dereference. git-svn-id: svn://kolibrios.org@8087 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 61af092dce..8a9c3d4281 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -1130,6 +1130,10 @@ proc setup_os_slot shr ecx, 2 rep movsd + lea eax, [edx+APP_EV_OFFSET] + mov dword [edx+APPDATA.fd_ev], eax + mov dword [edx+APPDATA.bk_ev], eax + lea eax, [edx+APP_OBJ_OFFSET] mov dword [edx+APPDATA.fd_obj], eax mov dword [edx+APPDATA.bk_obj], eax