As described in #61706, the ValueObjectChild::UpdateValue(...) may underflow the unsigned m_bitfield_bit_offset.
This is due to that in ValueObjectChild::UpdateValue(...), the moved overhang_bytes only considers the bitfield_end - *type_bit_size. However, under certain cases, the m_bitfield_bit_offset may not strictly aligned to *type_bit_size, e.g. 27 < 32.
This results 27 - 32 = -5 underflows the unsigned uint8_t m_bitfield_bit_offset.
This patch fixes this issue by setting the overhang_bytes to the smaller value between bitfield_end - *type_bit_size and m_bitfield_bit_offset to avoid underflow.
This patch also resolves the issue that m_value.GetScalar() being moved over the bitfield boundary, which leads to the truncation issue and is not addressed in the previous patch.
I am quite new to this community, any helps/guidance are much appreciated.