|
From: <sv...@va...> - 2016-01-12 14:32:13
|
Author: florian
Date: Tue Jan 12 14:32:05 2016
New Revision: 15755
Log:
VG_(fclose) ought to close the file, you silly. Fixes BZ #357887.
Modified:
trunk/NEWS
trunk/coregrind/m_libcprint.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Tue Jan 12 14:32:05 2016
@@ -57,6 +57,7 @@
355455 stderr.exp of test cases wrapmalloc and wrapmallocstatic overconstrained
355454 do not intercept malloc related symbols from the runtime linker
356044 Dwarf line info reader misinterprets is_stmt register
+357887 Fix a file handle leak. VG_(fclose) did not close the file
n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 32 bits
n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap
Modified: trunk/coregrind/m_libcprint.c
==============================================================================
--- trunk/coregrind/m_libcprint.c (original)
+++ trunk/coregrind/m_libcprint.c Tue Jan 12 14:32:05 2016
@@ -359,6 +359,7 @@
if (fp->num_chars)
VG_(write)(fp->fd, fp->buf, fp->num_chars);
+ VG_(close)(fp->fd);
VG_(free)(fp);
}
|
|
From: Matthias S. <zz...@ge...> - 2016-01-12 18:59:16
|
Am 12.01.2016 um 15:32 schrieb sv...@va...: > Author: florian > Date: Tue Jan 12 14:32:05 2016 > New Revision: 15755 > > Log: > VG_(fclose) ought to close the file, you silly. Fixes BZ #357887. > Wow, that could explain why callgrind did crash for me with --separate-threads=yes and --dump-every-bb after some time. I thought it was caused by kcachegrind triggering snapshotting to often. Doing a quick check like the following shows that it was just running out of file descriptors: # strace -o vg.strace.log valgrind --tool=callgrind--separate-threads=yes --dump-every-bb=20 kate Thanks for fixing this one. Regards Matthias |
|
From: Josef W. <Jos...@gm...> - 2016-01-12 19:37:11
|
Am 12.01.2016 um 19:58 schrieb Matthias Schwarzott: > Am 12.01.2016 um 15:32 schrieb sv...@va...: > Wow, that could explain why callgrind did crash for me with > --separate-threads=yes and --dump-every-bb after some time. That also means that I should fix cg to print a meaningful message when an output file cannot be created due to running out of file descriptors :-) Josef |