diff options
author | jkh <jkh@FreeBSD.org> | 1994-11-07 09:42:24 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1994-11-07 09:42:24 +0000 |
commit | 233f442355ded65018257e0a8aabc4231612653e (patch) | |
tree | f23e0d919658efc88fa8665ca3cd01cac2505eea /lib/libkvm | |
parent | 4bdaa744defaa806087ddbe9b3455b3e065fc78b (diff) | |
download | FreeBSD-src-233f442355ded65018257e0a8aabc4231612653e.zip FreeBSD-src-233f442355ded65018257e0a8aabc4231612653e.tar.gz |
From: "gj%pcs.dec.com@inet-gw-1.pa.dec.com" <garyj@rks32.pcs.dec.com>
Given the right circumstances, a call to kvm_open can result in a core
dump.
The diff belows fixes this (note that this change is already in the
NetBSD code). Could somebody apply this?
Gary J.
Submitted by: gj
Diffstat (limited to 'lib/libkvm')
-rw-r--r-- | lib/libkvm/kvm_amd64.c | 1 | ||||
-rw-r--r-- | lib/libkvm/kvm_i386.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c index 18f9f4d..a47a385 100644 --- a/lib/libkvm/kvm_amd64.c +++ b/lib/libkvm/kvm_amd64.c @@ -102,6 +102,7 @@ _kvm_initvtop(kvm_t *kd) { _kvm_err(kd, kd->program, "bad namelist"); return (-1); } + vm->PTD = 0 vm->IdlePTD = 0; if (KREAD(kd, (u_long)nlist[0].n_value, &vm->IdlePTD)) { _kvm_err(kd, kd->program, "cannot read IdlePTD"); diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c index 18f9f4d..a47a385 100644 --- a/lib/libkvm/kvm_i386.c +++ b/lib/libkvm/kvm_i386.c @@ -102,6 +102,7 @@ _kvm_initvtop(kvm_t *kd) { _kvm_err(kd, kd->program, "bad namelist"); return (-1); } + vm->PTD = 0 vm->IdlePTD = 0; if (KREAD(kd, (u_long)nlist[0].n_value, &vm->IdlePTD)) { _kvm_err(kd, kd->program, "cannot read IdlePTD"); |