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
This commit is contained in:
Philippe Waroquiers 2013-12-16 22:52:20 +00:00
parent 4247ea70e0
commit c33117f7d6
4 changed files with 7 additions and 6 deletions

5
NEWS
View File

@ -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

View File

@ -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);
}

View File

@ -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
}

View File

@ -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