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
When lj_snap_replay sees this, the #32762 will fall afoul of ir->op1 >= T->nk, causing #32762 to be treated as an IRRef, and then turned into an IRIns* and passed to snap_replay_const. Due to carefully chosen magic numbers in the example, that IRIns* will in fact be a double* pointing at 0.5029296875, which is very much not an IRIns, but has been carefully chosen to have ir->o == IR_KGC when treated as an IRIns. Bad things happen after this.
The following creates a trace containing the IR instruction
{sink} tab TNEW #32762 #0
:When
lj_snap_replay
sees this, the#32762
will fall afoul ofir->op1 >= T->nk
, causing#32762
to be treated as anIRRef
, and then turned into anIRIns*
and passed tosnap_replay_const
. Due to carefully chosen magic numbers in the example, thatIRIns*
will in fact be adouble*
pointing at0.5029296875
, which is very much not anIRIns
, but has been carefully chosen to haveir->o == IR_KGC
when treated as anIRIns
. Bad things happen after this.One quick fix is:
Or a more robust fix:
The text was updated successfully, but these errors were encountered: