diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-19 21:49:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-19 21:49:44 -0700 |
commit | efe9d7029d8187bfaff8332ad4452e9bd64f654e (patch) | |
tree | 0feb9c2efd499edb3faf9ea7b8105412b1d36b17 /vm.h | |
parent | 2cd47459acca8c1e26760264b82586b8645f4e2d (diff) | |
download | txr-efe9d7029d8187bfaff8332ad4452e9bd64f654e.tar.gz txr-efe9d7029d8187bfaff8332ad4452e9bd64f654e.tar.bz2 txr-efe9d7029d8187bfaff8332ad4452e9bd64f654e.zip |
vm: variadic arg closures bug 2/3.
* vm.c (vm_execute_closure): Remove bogus nargs local
variable, and replace its uses by fixparam which is the
correct one to use for getting the list of trailing arguments
using args_get_rest and for the loop which extracts the fixed
arguments. The "if (variadic)" statement near the end
specifically depends on the variadic destination register not
having been extracted yet from the instruction space,
so the argument count used in the previousl loop cannot
include that register. This bug was causing that statement to
extract a zero, thus register t0, which then blew up in the vm
execution as an attempt to modify t0.
Diffstat (limited to 'vm.h')
0 files changed, 0 insertions, 0 deletions