From a45b9424cb7258c00211115191f74fbaf8f74285 Mon Sep 17 00:00:00 2001 From: wangcichen Date: Mon, 23 May 2022 10:18:57 +0800 Subject: [PATCH 2/5] ptrace: fix NULL pointer access problem --- src/arch/aarch64/arch_ptrace.c | 2 -- src/arch/x86/arch_ptrace.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/arch/aarch64/arch_ptrace.c b/src/arch/aarch64/arch_ptrace.c index 774dc21..2227e95 100644 --- a/src/arch/aarch64/arch_ptrace.c +++ b/src/arch/aarch64/arch_ptrace.c @@ -465,8 +465,6 @@ kpatch_arch_ptrace_waitpid(kpatch_process_t *proc, /* TODO: fix the latter by SINGLESTEPping such a thread with * the original instruction in place */ - kperr("the thread ran out: %d, pc= %llx, expected = %lx\n", pid, - regs.pc, pctx->execute_until); errno = ESRCH; return -1; } diff --git a/src/arch/x86/arch_ptrace.c b/src/arch/x86/arch_ptrace.c index 9069484..9dede71 100644 --- a/src/arch/x86/arch_ptrace.c +++ b/src/arch/x86/arch_ptrace.c @@ -492,8 +492,6 @@ int kpatch_arch_ptrace_waitpid(kpatch_process_t *proc, /* TODO: fix the latter by SINGLESTEPping such a thread with * the original instruction in place */ - kperr("the thread ran out: %d, rip = %llx, expected = %lx\n", pid, - regs.rip, pctx->execute_until); errno = ESRCH; return -1; } -- 2.27.0