]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: fix GC safety issue in non-optimizing compiler
authorSlava Pestov <slava@shill.local>
Sun, 18 Oct 2009 23:57:41 +0000 (18:57 -0500)
committerSlava Pestov <slava@shill.local>
Sun, 18 Oct 2009 23:57:41 +0000 (18:57 -0500)
vm/jit.hpp

index 63b4454514bc8ef245aab1cc286be84821c31a23..6ebc3f2c0ea073721344bbfc2de76f9a55b0d171 100644 (file)
@@ -25,9 +25,10 @@ struct jit {
                emit_with(parent_vm->userenv[JIT_PUSH_IMMEDIATE],literal);
        }
 
-       void word_jump(cell word) {
+       void word_jump(cell word_) {
+               gc_root<word> word(word_,parent_vm);
                literal(tag_fixnum(xt_tail_pic_offset));
-               literal(word);
+               literal(word.value());
                emit(parent_vm->userenv[JIT_WORD_JUMP]);
        }