sim-se: Fix tgkill logic bug in handling signal argument
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 Change-Id: I3b02c618c369ef56d32a0b04e0b13eacc9fb4977
This commit is contained in:
committed by
Nicholas Mosier
parent
ebde1133c0
commit
8740385f9e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user