diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-31 10:14:09 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-31 10:14:09 -0700 |
commit | 0ea329da1fffa4bc9ca41b6f76c5d643c773ecb1 (patch) | |
tree | 563f281c26ac73768d75a29e04590d43aa3bdb99 /shell | |
parent | 650f417de2d471cf51668cd58c8e0fb19a834ec2 (diff) | |
download | mu-0ea329da1fffa4bc9ca41b6f76c5d643c773ecb1.tar.gz |
bugfix for disappearing trace
It turns out I have a problem with trace depth somewhere which I just wasn't noticing before. Running certain sandboxes (line; maybe loops?) twice was causing traces to no longer start at depth 1, which implies that they weren't terminating at depth 1. This became a lot more obvious since I instituted a max-depth.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/trace.mu | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shell/trace.mu b/shell/trace.mu index 85ca117b..490b0ade 100644 --- a/shell/trace.mu +++ b/shell/trace.mu @@ -73,6 +73,8 @@ fn clear-trace _self: (addr trace) { break-if-!= abort "null trace" } + var curr-depth-addr/ecx: (addr int) <- get self, curr-depth + copy-to *curr-depth-addr, 1 var len/edx: (addr int) <- get self, first-free copy-to *len, 0 # might leak memory; existing elements won't be used anymore |