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 |