sim-se: Fix tgkill logic bug in handling signal argument (#286)

The syscall emulation of tgkill contained a simple logic bug (a `||`
instead of a `&&`), causing the signal argument to always be considered
invalid. This patch fixes the bug by simply changing the `||` to a `&&`.

GitHub issue: https://github.com/gem5/gem5/issues/284
This commit is contained in:
Bobby R. Bruce
2023-09-12 08:32:56 -07:00
committed by GitHub

View File

@@ -2409,7 +2409,7 @@ tgkillFunc(SyscallDesc *desc, ThreadContext *tc, int tgid, int tid, int sig)
}
}
if (sig != 0 || sig != OS::TGT_SIGABRT)
if (sig != 0 && sig != OS::TGT_SIGABRT)
return -EINVAL;
if (tgt_proc == nullptr)