During consolidation of regions, buf_offset could get out of sync if
the region was grown on the left side.
To fix, reset it and let "sbb slide" logic correct it.
Bug: #6117.
DEBUG_VALIDATE_BUG_ON(dst_size != dst->buf_size);
if (dst_copy_offset != 0)
memmove(dst->buf + dst_copy_offset, dst->buf, old_size);
- dst->stream_offset = dst_offset;
+ if (dst_offset != dst->stream_offset) {
+ dst->stream_offset = dst_offset;
+ // buf_offset no longer valid, reset.
+ dst->buf_offset = 0;
+ }
uint32_t new_offset = src_start->buf_offset;
if (data_offset == src_start->stream_offset + src_start->buf_offset) {