Commit e103b072 authored by David Renshaw's avatar David Renshaw

Make sure to clear tag word when upgrading a struct list.

parent 01f6d5e4
......@@ -1360,7 +1360,8 @@ struct WireHelpers {
}
// Zero out old location. See explanation in getWritableStructPointer().
memset(oldPtr, 0, oldStep * elementCount * BYTES_PER_WORD / BYTES);
// Make sure to include the tag word.
memset(oldPtr - 1, 0, (1 + oldStep * elementCount) * BYTES_PER_WORD / BYTES);
return ListBuilder(origSegment, capTable, newPtr, newStep * BITS_PER_WORD, elementCount,
newDataSize * BITS_PER_WORD, newPointerCount, ElementSize::INLINE_COMPOSITE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment