|
From: Florian K. <fl...@ei...> - 2015-04-03 14:30:09
|
On 03.04.2015 04:14, Petar Jovanovic wrote:
>
> Field _valEx is used on MIPS only for pipe system call when kernel can
> return an array of two file descriptors. Otherwise, this field is undefined
> (actually, it has a value that happened to be in v1 register, which can be
> an arbitrary value and it is not deterministic). Thus, comparing _valEx
> does not make sense for an arbitrary SysRes.
Yes. But comparing _valEx makes sense when it has a deterministic value
(i.e. after a pipe call). So not comparing the _valEx value at all does
not sound right either. How is this (for mips64):
Index: coregrind/m_syscall.c
===================================================================
--- coregrind/m_syscall.c (revision 15062)
+++ coregrind/m_syscall.c (working copy)
@@ -859,6 +859,7 @@
ULong V0 = do_syscall_WRK(a1,a2,a3,a4,a5,a6,sysno,v1_a3);
ULong V1 = (ULong)v1_a3[0];
ULong A3 = (ULong)v1_a3[1];
+ if (sysno != _NR_pipe) V1 = 0; // V1 is unused for this syscall
return VG_(mk_SysRes_mips64_linux)( V0, V1, A3 );
#else
Does that help?
> Your yesterday's change r15060 breaks MIPS port in general, as comparing
> _valEx will fail immediately.
I made the change because the code as is was looked just wrong.
Florian
|