|
From: Petar J. <pe...@so...> - 2019-04-03 17:50:53
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=37f09ed248387ed3f4c7ba712fbc90e7468f6f4d commit 37f09ed248387ed3f4c7ba712fbc90e7468f6f4d Author: Petar Jovanovic <mip...@gm...> Date: Wed Apr 3 17:38:08 2019 +0000 mips32: pass correct syscall value to kernel in case of __NR_syscall The syscall number has to be put in register v0 before call into the kernel. This was omitted when system call is __NR_syscall (and when the syscall argument is the system call number of interest). Patch by Nikola Milutinovic. Diff: --- coregrind/m_syswrap/syscall-mips32-linux.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coregrind/m_syswrap/syscall-mips32-linux.S b/coregrind/m_syswrap/syscall-mips32-linux.S index 0bbfb2b..51f6518 100644 --- a/coregrind/m_syswrap/syscall-mips32-linux.S +++ b/coregrind/m_syswrap/syscall-mips32-linux.S @@ -112,7 +112,7 @@ ML_(do_syscall_for_client_WRK): lw $8, 48($29) /* t0 == ThreadState */ - lw $2, 52($29) /* v0 == syscallno */ + lw $2, OFFSET_mips32_r2($8) /* v0 == guest_v0 */ lw $4, OFFSET_mips32_r4($8) lw $5, OFFSET_mips32_r5($8) lw $6, OFFSET_mips32_r6($8) |