Skip to content

Fix 050b.php failure: Incorrect serialization or unserialization of references #1

@TysonAndre

Description

@TysonAndre

Related code:

 791   case 'r':
 792     {
 793       int64_t id = readInt();
 794       Variant *v = getByVal(id);
 795       if (!v) throwOutOfRange(id);
 796       tvSet(tvToInitCell(v->asTypedValue()), *self.asTypedValue());
 797     }
 798     break;
 799   case 'R':
 800     {
 801       if (UNLIKELY(mode == UnserializeMode::VecValue)) {
 802         throwVecRefValue();
 803       } else if (UNLIKELY(mode == UnserializeMode::DictValue)) {
 804         throwDictRefValue();
 805       } else if (RuntimeOption::EvalHackArrCompatNotices) {
 806         raiseHackArrCompatRefNew();
 807       }
 808 
 809       int64_t id = readInt();
 810       Variant *v = getByRef(id);
 811       if (!v) throwOutOfRange(id);
 812       self.assignRef(*v);
 813     }
 814     break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions