This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 02/10] Change dwarf2_frame_state_reg_info::reg to be std::vector
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> On 10/02/2018 05:44 AM, Tom Tromey wrote:
>> This changes dwarf2_frame_state_reg_info::reg to be a std::vector.
>> This avoids undefined behavior in the copy constructor when the
>> original object does not have any registers.
Pedro> I don't have anything to say against the patch, I think it's a nice
Pedro> cleanup regardless, but could you expand this log a little to point
Pedro> out exactly what is triggering the undefined behavior. I guess we're
Pedro> passing NULL to the memcpy?
Yes, that was the issue. Simon asked for this cleanup IIRC.
I've added a note about this to the commit message.
Tom