Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/uvm pull up revs 1.16 and 1.17, approved by thorpej:
details: https://anonhg.NetBSD.org/src/rev/a8e7d00d51e4
branches: netbsd-1-5
changeset: 489403:a8e7d00d51e4
user: chs <chs%NetBSD.org@localhost>
date: Thu Sep 07 07:04:42 2000 +0000
description:
pull up revs 1.16 and 1.17, approved by thorpej:
> in uvm_coredump*(), avoid dumping parts of the stack multiple times
> while skipping parts of the stack that haven't been used.
> pointed out by SAITOH Masanobu <masanobu%iij.ad.jp@localhost>.
diffstat:
sys/uvm/uvm_unix.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diffs (69 lines):
diff -r 9d9f6226c5dc -r a8e7d00d51e4 sys/uvm/uvm_unix.c
--- a/sys/uvm/uvm_unix.c Thu Sep 07 01:36:58 2000 +0000
+++ b/sys/uvm/uvm_unix.c Thu Sep 07 07:04:42 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_unix.c,v 1.12.4.1 2000/07/02 17:41:17 thorpej Exp $ */
+/* $NetBSD: uvm_unix.c,v 1.12.4.2 2000/09/07 07:04:42 chs Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -187,12 +187,13 @@
struct vmspace *vm = p->p_vmspace;
vm_map_t map = &vm->vm_map;
vm_map_entry_t entry;
- vaddr_t start, end;
+ vaddr_t start, end, maxstack;
struct coreseg cseg;
off_t offset;
int flag, error = 0;
offset = chdr->c_hdrsize + chdr->c_seghdrsize + chdr->c_cpusize;
+ maxstack = trunc_page(USRSTACK - ctob(vm->vm_ssize));
for (entry = map->header.next; entry != &map->header;
entry = entry->next) {
@@ -215,10 +216,11 @@
end = VM_MAXUSER_ADDRESS;
if (start >= (vaddr_t)vm->vm_maxsaddr) {
+ if (end <= maxstack)
+ continue;
+ if (start < maxstack)
+ start = maxstack;
flag = CORE_STACK;
- start = trunc_page(USRSTACK - ctob(vm->vm_ssize));
- if (start >= end)
- continue;
} else
flag = CORE_DATA;
@@ -266,12 +268,13 @@
struct vmspace *vm = p->p_vmspace;
vm_map_t map = &vm->vm_map;
vm_map_entry_t entry;
- vaddr_t start, end;
+ vaddr_t start, end, maxstack;
struct coreseg32 cseg;
off_t offset;
int flag, error = 0;
offset = chdr->c_hdrsize + chdr->c_seghdrsize + chdr->c_cpusize;
+ maxstack = trunc_page(USRSTACK - ctob(vm->vm_ssize));
for (entry = map->header.next; entry != &map->header;
entry = entry->next) {
@@ -294,10 +297,11 @@
end = VM_MAXUSER_ADDRESS;
if (start >= (vaddr_t)vm->vm_maxsaddr) {
+ if (end <= maxstack)
+ continue;
+ if (start < maxstack)
+ start = maxstack;
flag = CORE_STACK;
- start = trunc_page(USRSTACK - ctob(vm->vm_ssize));
- if (start >= end)
- continue;
} else
flag = CORE_DATA;
Home |
Main Index |
Thread Index |
Old Index