From b58f2b8e26cab6b67eceaa36fd6ce5a6d04dcd28 Mon Sep 17 00:00:00 2001 From: Adrian Muzyka Date: Mon, 30 Sep 2024 09:43:39 +0000 Subject: [PATCH] Do return instead of crash on parasite not available Do not trigger crash when checkpointed PID with parasite was externally terminated, and parasite PID was already reaped by Memcr service process. --- memcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memcr.c b/memcr.c index a6b33d5..3dc4b15 100644 --- a/memcr.c +++ b/memcr.c @@ -2065,7 +2065,7 @@ static void *parasite_watch_thread(void *ptr) ret = wait4(pid, &status, __WALL, NULL); if (ret != pid) { fprintf(stderr, "[-] wait4() ret %d != parasite %ld, errno %m\n", ret, pid); - assert(ret == pid); + return NULL; } parasite_status_signal(pid, status);