fix race in which some instruction name symbols could go unmarked
authorAndy Wingo <wingo@pobox.com>
Thu, 2 Jul 2009 15:46:23 +0000 (17:46 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 14 Jul 2009 19:29:41 +0000 (21:29 +0200)
commitad47e35939ef86a031af68d5875de4180f2517cb
tree5120eaaee5e4716e7283774d67c38704c8e4d12e
parentcec1d4e33f1485985df9877330729c964f38cc2f
fix race in which some instruction name symbols could go unmarked

* libguile/instructions.c: In loops, replace scm_op_last with
  SCM_VM_NUM_INSTRUCTIONS.
  (fetch_instruction_table): Protect the instruction symbols from
  collection. Before they were only marked by the name->opcode hash
  table, leading to races in which they could be collected.
  (scm_lookup_instruction_by_name): Protect the hash table earlier, as
  it's not actually a stack variable, since it's static.
libguile/instructions.c
libguile/instructions.h