|
From: Nicholas N. <nj...@ca...> - 2003-09-15 09:45:39
|
On Sun, 7 Sep 2003, Geoff Alexander wrote:
> The attached change works fine for valgrind 1.9.6. I get
> ==1324== Warning: invalid file descriptor -1 in syscall read()
> ==1324== at 0x403CA224: __libc_read (in /lib/libc.so.6)
> ==1324== by 0x40378920: _IO_file_underflow@@GLIBC_2.1 (in /lib/libc.so.6)
> ==1324== by 0x40379CAA: _IO_default_uflow (in /lib/libc.so.6)
> ==1324== by 0x40379BA6: __uflow (in /lib/libc.so.6)
> ==1324== by 0x40362DC9: _IO_vfscanf (in /lib/libc.so.6)
> ==1324== by 0x40366C85: __vfscanf (in /lib/libc.so.6)
> ==1324== by 0x804CF6E: _ZN12gdaUtilities15SystemFunctions6fscanfEP8_IO_FILEPKcz (SystemFunctions.cpp:57)
> ==1324== by 0x8049ED0: main (TestSystemFunctions.cpp:152)
> ==1324== by 0x40327BAE: __libc_start_main (in /lib/libc.so.6)
> ==1324== by 0x8049460: (within /home/gdlxn/gdaUtilities/test/TestSystemFunctions)
> But when I make the change in valgrind 20030725, I get
> ==15191== Warning: invalid file descriptor -1 in syscall read()
> ==15191== at 0x0: ???
> Is there a way to get a valid trace in valgrind 20030725?
Try changing the VG_(pp_ExeContext)() call in the added code snippet to
this:
VG_(pp_ExeContext)( VG_(get_ExeContext)( tid ) );
> Also, is it possible to suppress invalid file descriptor warnings in
> valgrind? I tried using the --gen-suppressions option in valgrind
> 20030725, but no suppression was generated.
No, because those warnings aren't done "properly" through the error
handling system, because they tend to be pretty rare. The easiest answer
is to comment out the code.
As for why you want to suppress it... is there a good reason why you're
passing -1 as a file descriptor to read()?
N
|