|
|
|
@ -161,6 +161,12 @@ enum fh_error w_user_word(struct fh_thread_s *fh, const struct fh_word_s *w0) |
|
|
|
|
} |
|
|
|
|
// make sure it's aligned
|
|
|
|
|
fh->execptr = WORDALIGNED(fh->execptr); |
|
|
|
|
|
|
|
|
|
if (fh->execptr == 0 || fh->execptr > fh->here) { |
|
|
|
|
LOGE("Bad execptr value 0x%08x", fh->execptr); |
|
|
|
|
return FH_ERR_ILLEGAL_FETCH; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const struct fh_instruction_s *instr = fh_instr_at(fh, fh->execptr); |
|
|
|
|
if (!instr) { |
|
|
|
|
LOGE("Execution pointer out of bounds!"); |
|
|
|
@ -431,6 +437,7 @@ enum fh_error w_user_word(struct fh_thread_s *fh, const struct fh_word_s *w0) |
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
LOGE("Run handler not implemented for instr opcode %d", instr->kind); |
|
|
|
|
return FH_ERR_BAD_OPCODE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
end: |
|
|
|
|