1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

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.
This commit is contained in:
Andy Wingo 2009-07-02 17:46:23 +02:00
parent cec1d4e33f
commit ad47e35939
2 changed files with 9 additions and 9 deletions

View file

@ -31,7 +31,6 @@ enum scm_opcode {
#include <libguile/vm-i-scheme.i>
#include <libguile/vm-i-loader.i>
#undef VM_INSTRUCTION_TO_OPCODE
scm_op_last = SCM_VM_NUM_INSTRUCTIONS
};
SCM_API SCM scm_instruction_list (void);