From c33117f7d67e821e4feedccf23cb363e9208351b Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Mon, 16 Dec 2013 22:52:20 +0000 Subject: [PATCH] Fix 325714 Empty vgcore but RLIMIT_CORE is big enough (too big) Use ULong rather than UInt for coredump file size. Tested manually by ulimit -c 4294967296 ./vg-in-place ./gdbserver_tests/gone abort valgrind creates vgcore.xxxxx unusable by GDB. With the fix, GDB can read the core dump. Patch from Romain Geissler git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13762 --- NEWS | 5 +++-- coregrind/m_coredump/coredump-elf.c | 4 ++-- coregrind/m_coredump/coredump-macho.c | 2 +- coregrind/pub_core_coredump.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 6e484ef8f..fa4537c95 100644 --- a/NEWS +++ b/NEWS @@ -13,8 +13,8 @@ Release 3.10.0 (?? ?????? 201?) * New and modified GDB server monitor features: - - A new monitor command "v.info stats" that shows various valgrind core and tool - statistics. + - A new monitor command "v.info stats" that shows various valgrind core and + tool statistics. * ==================== FIXED BUGS ==================== @@ -29,6 +29,7 @@ To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX where XXXXXX is the bug number as listed below. +325714 Empty vgcore but RLIMIT_CORE is big enough (too big) 326462 Refactor vgdb to isolate invoker stuff into separate module 326983 Clear direction flag after tests on amd64. 327238 Callgrind Assertion 'passed <= last_bb->cjmp_count' failed diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index 98d855bbf..65b706104 100644 --- a/coregrind/m_coredump/coredump-elf.c +++ b/coregrind/m_coredump/coredump-elf.c @@ -518,7 +518,7 @@ static void fill_xfpu(const ThreadState *tst, vki_elf_fpxregset_t *xfpu) #endif static -void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, UInt max_size) +void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, ULong max_size) { HChar* buf = NULL; const HChar *basename = "vgcore"; @@ -692,7 +692,7 @@ void make_elf_coredump(ThreadId tid, const vki_siginfo_t *si, UInt max_size) VG_(close)(core_fd); } -void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) +void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, ULong max_size) { make_elf_coredump(tid, si, max_size); } diff --git a/coregrind/m_coredump/coredump-macho.c b/coregrind/m_coredump/coredump-macho.c index 499bebabc..dbd3d6a42 100644 --- a/coregrind/m_coredump/coredump-macho.c +++ b/coregrind/m_coredump/coredump-macho.c @@ -36,7 +36,7 @@ #include "pub_core_libcsetjmp.h" // to keep _threadstate.h happy #include "pub_core_threadstate.h" -void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, UInt max_size) +void VG_(make_coredump)(ThreadId tid, const vki_siginfo_t *si, ULong max_size) { // DDD: #warning GrP fixme coredump } diff --git a/coregrind/pub_core_coredump.h b/coregrind/pub_core_coredump.h index c981e7fac..08e41079c 100644 --- a/coregrind/pub_core_coredump.h +++ b/coregrind/pub_core_coredump.h @@ -39,7 +39,7 @@ //-------------------------------------------------------------------- extern void VG_(make_coredump) ( ThreadId tid, const vki_siginfo_t *si, - UInt max_size ); + ULong max_size ); #endif // __PUB_CORE_COREDUMP_H