|
From: Tom H. <to...@co...> - 2005-06-22 16:51:00
|
In message <Pin...@ch...>
Nicholas Nethercote <nj...@cs...> wrote:
> 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.
It looks like nonsense to me. I don't think a futex FD will have
a name associated with it so I resolve_filename probably won't be
able to do much.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|