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
ZJIT: Add missing guard on ivar access on T_{DATA,CLASS,MODULE}
T_DATA, T_MODULE, and T_CLASS objects can share the exact same shape.
The shape on these objects give an index off of the fields array to
get at the ivar. When two objects share the same shape, but differ
in the T_* builtin type, however, the way to get to the fields array
differ.
Previously, we did not guard the builtin type, so the guard allowed
using say, loading `t_string[RCLASS_OFFSET_PRIME_FIELDS_OBJ]`. A classic
type confusion situation that crashed.
Guard the builtin type, in addition to the shape. Note that this is not
necessary for T_OBJECTs since they never have the same shape as other
builtin types.
0 commit comments