lkml.org 
[lkml]   [2017]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RESEND] coredump: Ensure proper size of sparse core files
From
From: Dave Kleikamp <dave.kleikamp@oracle.com>
Date: Wed, 11 Jan 2017 13:25:00 -0600

> If the last section of a core file ends with an unmapped or zero page,
> the size of the file does not correspond with the last dump_skip() call.
> gdb complains that the file is truncated and can be confusing to users.
>
> After all of the vma sections are written, make sure that the file size
> is no smaller than the current file position.
>
> This problem can be demonstrated with gdb's bigcore testcase on the
> sparc architecture.
>
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>

The lseek() done by dump_skip() should extend the file properly.

Otherwise, everyone would be seeing this problem.

That test case passed all the time when I was last running the GDB
testsuite all the time on sparc64, say 5 years ago.

\
 
 \ /
  Last update: 2017-01-17 04:45    [W:0.081 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site