You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just followed the code by eye, so if I'm wrong or that's the intended behavior, please ignore it.
two consecutive FETCH_XXX() from iseq may
While OP_DEBUG is defined as operand type BBB in include/mruby/ops.h, it is defined as operand type Z in src/vm.c followed by FETCH_BBB().
I assume that OP_DEBUG always intends to FETCH_BBB(), but if the operand is extended with instruction OP_EXT3, for example, FETCH_SSB() is performed followed by FETCH_BBB().
If this is not the intention, it is better to change OP_DEBUG in src/vm.c to BBB or OP_DEBUG in include/mruby/ops.h to Z.
inconsistency when the configuration macro MRB_USE_DEBUG_HOOK is defined
In normal instructions, mrb->debug_op_hook() is called before decoding the operand.
For OP_DEBUG, mrb->debug_op_hook() is called again after FETCH_BBB(). In addition, NULL check of mrb->debug_op_hook is not performed at this time.
The text was updated successfully, but these errors were encountered:
I just followed the code by eye, so if I'm wrong or that's the intended behavior, please ignore it.
two consecutive
FETCH_XXX()
fromiseq
mayWhile
OP_DEBUG
is defined as operand typeBBB
ininclude/mruby/ops.h
, it is defined as operand typeZ
insrc/vm.c
followed byFETCH_BBB()
.I assume that
OP_DEBUG
always intends toFETCH_BBB()
, but if the operand is extended with instructionOP_EXT3
, for example,FETCH_SSB()
is performed followed byFETCH_BBB()
.If this is not the intention, it is better to change
OP_DEBUG
insrc/vm.c
toBBB
orOP_DEBUG
ininclude/mruby/ops.h
toZ
.inconsistency when the configuration macro
MRB_USE_DEBUG_HOOK
is definedIn normal instructions,
mrb->debug_op_hook()
is called before decoding the operand.For
OP_DEBUG
,mrb->debug_op_hook()
is called again afterFETCH_BBB()
. In addition,NULL
check ofmrb->debug_op_hook
is not performed at this time.The text was updated successfully, but these errors were encountered: