[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Problems with Valgrind CVS and Suse 9.0
From: Josef Weidendorfer <Josef.Weidendorfer () gmx ! de>
Date: 2003-10-30 10:01:53
[Download RAW message or body]
Hi,
I just checked my skin with Valgrind CVS and Suse 9.0,
and now I have the problem that the skin doesn't generate
dumps any more.
I have in SK_(post_clo_init):
...
VG_(sprintf)(filename, "%s.%d", dump_file_base, VG_(getpid)());
fd = VG_(open)(filename, VKI_O_WRONLY|VKI_O_TRUNC, 0);
if (-1 == fd) {
fd = VG_(open)(filename, VKI_O_CREAT|VKI_O_WRONLY,
VKI_S_IRUSR|VKI_S_IWUSR);
if (-1 == fd) {
file_err();
}
}
VG_(close)(fd);
...
to truncate/create the dump file.
With strace, I see this for this part of code:
getpid() = 13270
open("/home/weidendo/dumps/cachegrind.out.13270", O_WRONLY|O_TRUNC) = -1
ENOENT
(No such file or directory)
close(-2) = -1 EBADF (Bad file descriptor)
Obviously, strace correctly gives back -1 for
fd = VG_(open)(filename, VKI_O_WRONLY|VKI_O_TRUNC, 0);
but my skin gets -2 (Ok, that's a small bug to call close(-2), but still...).
But it should get -1, too ?!?
Josef
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic