diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-27 20:34:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-27 20:34:46 -0700 |
commit | e33a9054a2c7d3d835ad54dff0043571bab362a8 (patch) | |
tree | 2990d5faff617a52e395e79172e0798df0a3a573 | |
parent | f7e09d72c2ee6cfe4a839b24b52761a8135ffa91 (diff) | |
download | txr-e33a9054a2c7d3d835ad54dff0043571bab362a8.tar.gz txr-e33a9054a2c7d3d835ad54dff0043571bab362a8.tar.bz2 txr-e33a9054a2c7d3d835ad54dff0043571bab362a8.zip |
compiler: bugfix: register double free.
* share/txr/stdlib/compiler.tl (compiler comp-progn): Since
oreg-discard is conditionally allocated, it must be
only be freed if it had been allocated.
-rw-r--r-- | share/txr/stdlib/compiler.tl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index fe9bfce8..8f64adca 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -753,7 +753,8 @@ (set fvars (uni fvars frag.fvars)) (set ffuns (uni ffuns frag.ffuns)) (pend frag.code))))))) - me.(free-treg oreg-discard) + (when (nequal oreg oreg-discard) + me.(free-treg oreg-discard)) (new (frag (if lastfrag lastfrag.oreg ^(t 0)) code fvars ffuns)))) (defmeth compiler comp-and-or (me oreg env form) |