Fix startup.cbc load (bb #2330).

BC_STARTUP is already prepared with JIT, so Functions[i] is garbage,
don't attempt to codegen it.
0.96
Török Edvin 15 years ago
parent b49a08351a
commit 34306523a1
  1. 2
      libclamav/c++/bytecode2llvm.cpp

@ -2022,6 +2022,8 @@ int cli_bytecode_prepare_jit(struct cli_all_bc *bcs)
for (unsigned i=0;i<bcs->count;i++) {
const struct cli_bc_func *func = &bcs->all_bcs[i].funcs[0];
if (bcs->all_bcs[i].state == bc_interp)
continue; /* probably BC_STARTUP */
bcs->engine->compiledFunctions[func] = EE->getPointerToFunction(Functions[i]);
bcs->all_bcs[i].state = bc_jit;
}

Loading…
Cancel
Save