Fixed OP_SWITCH accidentally using the wrong address to get the pcode base (regression based on assumption of JitWriter::inbase).
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402464
This commit is contained in:
parent
2c25c09420
commit
b595047fdf
@ -1600,8 +1600,9 @@ inline void WriteOp_JsGeq(JitWriter *jit)
|
||||
|
||||
inline void WriteOp_Switch(JitWriter *jit)
|
||||
{
|
||||
CompData *data = (CompData *)jit->data;
|
||||
cell_t offs = jit->read_cell();
|
||||
cell_t *tbl = (cell_t *)((char *)jit->inbase + offs + sizeof(cell_t));
|
||||
cell_t *tbl = (cell_t *)((char *)data->plugin->pcode + offs + sizeof(cell_t));
|
||||
|
||||
struct casetbl
|
||||
{
|
||||
@ -2436,6 +2437,12 @@ jitoffs_t RelocLookup(JitWriter *jit, cell_t pcode_offs, bool relative)
|
||||
/* Offset must always be 1)positive and 2)less than or equal to the codesize */
|
||||
assert(pcode_offs >= 0 && (uint32_t)pcode_offs <= data->plugin->pcode_size);
|
||||
/* Do the lookup in the native dictionary. */
|
||||
#if defined _DEBUG
|
||||
if (jit->outbase != NULL)
|
||||
{
|
||||
assert(*(jitoffs_t *)(data->rebase + pcode_offs) != NULL);
|
||||
}
|
||||
#endif
|
||||
return *(jitoffs_t *)(data->rebase + pcode_offs);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user