Subject: CVS commit: [netbsd-2-0] src/sbin/savecore
To: None <source-changes@NetBSD.org>
From: Thor Lancelot Simon <tls@netbsd.org>
List: source-changes
Date: 07/14/2004 07:14:50
Module Name:	src
Committed By:	tls
Date:		Wed Jul 14 07:14:50 UTC 2004

Modified Files:
	src/sbin/savecore [netbsd-2-0]: savecore.c

Log Message:
Fix an integer overflow that prevented saving cores from machines with
more than 2GB of RAM.

"dumpsize" in the on-disk core header is in pages, but, unfortunately,
c.size in our kcore format is an unsigned 32-bit int, gross.

We sleaze it, using a 64-bit int internally here and handing it to
libkvm as a *signed* 32-bit int.  Won't always work, but shouldn't be
broken any worse than it is now, and sometimes work better.

We must fix the kcore format and libkvm.


To generate a diff of this commit:
cvs rdiff -r1.61 -r1.61.2.1 src/sbin/savecore/savecore.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.