Skip to content

Commit

Permalink
Fix off-by-one error in the GCC plugin's temp root simulation
Browse files Browse the repository at this point in the history
This let us believe that stuff was rooted after an MVM_gc_root_temp_popn when
it really wasn't anymore.
  • Loading branch information
niner committed Apr 25, 2020
1 parent dae0220 commit 24e9082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/check-roots.py
Expand Up @@ -657,7 +657,7 @@ def check_code_for_var(fun, var, orig_initialized, warned={}):
if not root_stack or not isinstance(ins.args[1], gcc.Constant):
print("Skipping function %s because of complicated rooting" % fun.decl.name)
return
for i in range(1, ins.args[1].constant):
for i in range(0, ins.args[1].constant):
if arg_is_var(root_stack.pop(), var):
rooted = False
if initialized and not allocating_in_gen2 and ins.fn.operand.name in allocators:
Expand Down

0 comments on commit 24e9082

Please sign in to comment.