diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-03-22 20:49:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-03-22 20:49:34 -0700 |
commit | 07bc53f2f5736ee0ecc5f152432446e7b4a200f8 (patch) | |
tree | 503d5d39ec4d84a690fa1aa9e8ea7ac7ed4b6c2f /struct.c | |
parent | 7b6473d3895c94397206913937e93b1aad48952e (diff) | |
download | txr-07bc53f2f5736ee0ecc5f152432446e7b4a200f8.tar.gz txr-07bc53f2f5736ee0ecc5f152432446e7b4a200f8.tar.bz2 txr-07bc53f2f5736ee0ecc5f152432446e7b4a200f8.zip |
vm: bugfix: cannot access vec during gc.
Let's have a field in struct vm_desc that keeps track of the
ftab size. The problem is when we do length_vec(vd->funvec) in
vm_desc_mark, we are in the middle of garbage collection.
The object's tag has a reachable bit which blows up the
type check.
* vm.c (struct vm_desc): New member, ftsz.
(vm_make_desc): Store the length of the function table
into ftsz.
(vm_desc_mark): Use the stored length as the loop bound;
do not access vd->funvec.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions