summaryrefslogtreecommitdiff
path: root/sim/syscall_emul.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sim/syscall_emul.hh')
-rw-r--r--sim/syscall_emul.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 51a075a28..69c17c330 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -412,6 +412,10 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
// user didn't give an address... pick one from our "mmap region"
start = p->mmap_end;
p->mmap_end += RoundUp<Addr>(length, VMPageSize);
+ if (p->nxm_start != 0) {
+ //If we have an nxm space, make sure we haven't colided
+ assert(p->mmap_end < p->nxm_start);
+ }
}
if (!(flags & OS::TGT_MAP_ANONYMOUS)) {