Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check owning object wasn't disclaimed.
Some objects are serialized as part of an enclosing object (more for
historical reasons than good ones at this point, alas). Check we did
not clear an SC when doing repossession.
  • Loading branch information
jnthn authored and FROGGS committed May 15, 2015
1 parent 6604cb7 commit 1a36596
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/6model/sc.c
Expand Up @@ -327,8 +327,12 @@ void MVM_sc_wb_hit_obj(MVMThreadContext *tc, MVMObject *obj) {
MVMint64 i;
for (i = 0; i < n; i += 2) {
if (MVM_repr_at_pos_o(tc, owned_objects, i) == obj) {
MVMSerializationContext *real_sc;
obj = MVM_repr_at_pos_o(tc, owned_objects, i + 1);
if (MVM_sc_get_obj_sc(tc, obj) == comp_sc)
real_sc = MVM_sc_get_obj_sc(tc, obj);
if (!real_sc)
return; /* Probably disclaimed. */
if (real_sc == comp_sc)
return;
found = 1;
break;
Expand Down

0 comments on commit 1a36596

Please sign in to comment.