https://bugs.kde.org/show_bug.cgi?id=506910
--- Comment #2 from Mark Wielaard <[email protected]> --- The issue seems to be that at the end of sys_openat2 if we detected it was called on proc_self_exe then we want to force the syscall with VG_(resolved_exename) as ARG2 and SET_STATUS_from_SysRes. But then fall through to where we set flags to contain SfMayBlock. We could do an immediate return after: // do the syscall with VG_(resolved_exename) SET_STATUS_from_SysRes(VG_(do_syscall4)(SYSNO, ARG1, (Word)VG_(resolved_exename), ARG3, ARG4)); return; But since it is the same syscall it seems simpler to just modify ARG2 and fall through. Testing the following patch: diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index e16d293cd08f..1499e75bccf0 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -6094,7 +6094,7 @@ no_client_write: if (proc_self_exe) { // do the syscall with VG_(resolved_exename) - SET_STATUS_from_SysRes(VG_(do_syscall4)(SYSNO, ARG1, (Word)VG_(resolved_exename), ARG3, ARG4)); + ARG2 = (Word)VG_(resolved_exename); } /* Otherwise handle normally */ @@ -14095,7 +14095,8 @@ PRE(sys_openat2) if (proc_self_exe) { // do the syscall with VG_(resolved_exename) - SET_STATUS_from_SysRes(VG_(do_syscall4)(SYSNO, ARG1, (Word)VG_(resolved_exename), ARG3, ARG4)); + ARG2 = (Word)VG_(resolved_exename); + } /* Otherwise handle normally */ -- You are receiving this mail because: You are watching all bug changes.
