about summary refs log tree commit diff stats
path: root/044space.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-07-17 12:51:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-07-17 12:58:37 -0700
commit32cd40ec3c9dad33738caf6f55fb742a316bd5be (patch)
treec6612fefc35741b43e1058826445d2913e94b3ba /044space.cc
parentfe9e53ed19f84a1771d56bfa0cf7d1d017e07559 (diff)
downloadmu-32cd40ec3c9dad33738caf6f55fb742a316bd5be.tar.gz
1799 - continue to debug memory corruption of 1795
Things I figured out:
- 'row' in render-screen doesn't perfectly track cursor-row in screen
- proximal cause was forgetting to add left:number to stop-printing
- trying to print to screen outside bounds was silently succeeding and
  corrupting simulated memory
- if we silently ignore prints outside bounds things are fine

But why are prints outside screen bounds working? We should be accessing
screen data using 'index', and that's checking its bounds.
Diffstat (limited to '044space.cc')
-rw-r--r--044space.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/044space.cc b/044space.cc
index 4469e47f..40f0f5ba 100644
--- a/044space.cc
+++ b/044space.cc
@@ -178,6 +178,7 @@ void try_reclaim_locals() {
   if (inst.name != "local-scope")
     return;
 //?   cerr << inst.to_string() << '\n'; //? 1
+//?   cerr << current_recipe_name() << ": abandon " << Current_routine->calls.front().default_space << '\n'; //? 1
   abandon(Current_routine->calls.front().default_space,
           /*array length*/1+/*number-of-locals*/Name[r][""]);
 }