|
From: Nicholas N. <nj...@cs...> - 2005-06-22 16:46:57
|
Hi,
Can anyone help with this?
I see this code in coregrind/m_syswrap/syswrap-linux.c:
POST(sys_futex)
{
vg_assert(SUCCESS);
POST_MEM_WRITE( ARG1, sizeof(int) );
if (ARG2 == VKI_FUTEX_FD) {
if (!VG_(fd_allowed)(RES, "futex", tid, True)) {
VG_(close)(RES);
SET_STATUS_Failure( VKI_EMFILE );
} else {
if (VG_(clo_track_fds))
VG_(record_fd_open)(tid, RES, VG_(arena_strdup)(VG_AR_CORE, (Char*)ARG1));
}
}
For the VG_(record_fd_open)() call, should the 3rd arg really be ARG1?
That arg is meant to be the pathname of the opened fd. Does ARG1 fit that
bill? I would have thought we'd need to call VG_(resolve_filename)()
on RES to get the pathname for the fd, like all the examples in
syswrap-generic.c.
I tried to work out who wrote the code, but the SVN history is difficult
to follow because this code got moved about.
Thanks.
Nick
|