Fix alpha - the use of min() on longs was loosing the high bits and
returning wrong answers, leading to strange values vm2->vm_{s,t,d}size.
This commit is contained in:
parent
143a002e40
commit
1dad8fe1ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131251
@ -2360,12 +2360,12 @@ vmspace_map_entry_forked(const struct vmspace *vm1, struct vmspace *vm2,
|
||||
vm2->vm_ssize += btoc(entrysize);
|
||||
} else if (entry->start >= (vm_offset_t)vm1->vm_daddr &&
|
||||
entry->start < (vm_offset_t)vm1->vm_daddr + ctob(vm1->vm_dsize)) {
|
||||
newend = min(entry->end,
|
||||
newend = ulmin(entry->end,
|
||||
(vm_offset_t)vm1->vm_daddr + ctob(vm1->vm_dsize));
|
||||
vm2->vm_dsize += btoc(newend - entry->start);
|
||||
vm2->vm_dsize += btoc(newend - entry->start);
|
||||
} else if (entry->start >= (vm_offset_t)vm1->vm_taddr &&
|
||||
entry->start < (vm_offset_t)vm1->vm_taddr + ctob(vm1->vm_tsize)) {
|
||||
newend = min(entry->end,
|
||||
newend = ulmin(entry->end,
|
||||
(vm_offset_t)vm1->vm_taddr + ctob(vm1->vm_tsize));
|
||||
vm2->vm_tsize += btoc(newend - entry->start);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user