about summary refs log tree commit diff stats
path: root/subx/040---tests.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-11 00:30:31 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-11 00:30:31 -0700
commit36c745f8e0cb24b781a5cb6bb7e829937dabec46 (patch)
tree8142f7ccf3ba62c5e16cfaacf6248ce95c1e69c8 /subx/040---tests.cc
parent1ebb7614921a2b426ed84c4c51b100176e2a4187 (diff)
downloadmu-36c745f8e0cb24b781a5cb6bb7e829937dabec46.tar.gz
5152 - check for stack underflow/overflow in VM
Diffstat (limited to 'subx/040---tests.cc')
-rw-r--r--subx/040---tests.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/subx/040---tests.cc b/subx/040---tests.cc
index d35cc711..237bb811 100644
--- a/subx/040---tests.cc
+++ b/subx/040---tests.cc
@@ -16,7 +16,8 @@ Transform.push_back(create_test_function);
 
 :(code)
 void test_run_test() {
-  Reg[ESP].u = 0x100;
+  Mem.push_back(vma(0x7d000000));  // manually allocate memory
+  Reg[ESP].u = 0x7d000100;
   run(
       "== 0x1\n"  // code segment
       "main:\n"