|
From: Stefan H. <hu...@in...> - 2003-05-29 12:33:04
|
Hi, I'm examining a program and keep getting the message: (1) ==17858== Warning: invalid file descriptor 28 in syscall read() Is there a way to trace from where the read() was called? Regards. -- Stefan Huelswitt hu...@in... | http://home.pages.de/~nathan |
|
From: Nicholas N. <nj...@ca...> - 2003-05-29 12:50:41
|
On Thu, 29 May 2003, Stefan Huelswitt wrote:
> I'm examining a program and keep getting the message:
>
> (1) ==17858== Warning: invalid file descriptor 28 in syscall read()
>
> Is there a way to trace from where the read() was called?
In coregrind/vg_scheduler.c, try replacing this code (around line 890):
if (VG_(needs).core_errors)
VG_(message)(Vg_UserMsg,
"Warning: invalid file descriptor %d in syscall %s",
fd, syscall_no == __NR_read ? "read()" : "write()" );
with this:
if (VG_(needs).core_errors) {
VG_(message)(Vg_UserMsg,
"Warning: invalid file descriptor %d in syscall %s",
fd, syscall_no == __NR_read ? "read()" : "write()" );
VG_(pp_ExeContext)( VG_(get_ExeContext)( & VG_(threads)[tid] ) );
}
This is obviously only a temporary hack, but it should be enough to help
you for this case. Perhaps this change should be made permanent.
N
|
|
From: Stefan H. <hu...@in...> - 2003-05-29 14:56:23
|
On 29-May-2003 Nicholas Nethercote wrote:
> with this:
>
> if (VG_(needs).core_errors) {
> VG_(message)(Vg_UserMsg,
> "Warning: invalid file descriptor %d in syscall %s",
> fd, syscall_no == __NR_read ? "read()" : "write()" );
> VG_(pp_ExeContext)( VG_(get_ExeContext)( & VG_(threads)[tid] ) );
> }
>
Thanks. This does the trick.
--
Stefan Huelswitt
hu...@in... | http://home.pages.de/~nathan
|