On 5/13/26 4:54 AM, Schimpe, Christina wrote:
+  record_full_incomplete_instruction.effects.shrink_to_fit ();
+  record_full_list.push_back (record_full_incomplete_instruction);
I think this line will at some point call the default copy constructor of
record_full_mem_entry
and record_full_reg_entry, which have those buffers:

gdb_byte buf[sizeof (gdb_byte *)];

IIUC you'll only have a shallow copy. Should we use a std::move instead
here?
Might be worth, yeah...
I further wonder if this problem might be related to the double free issues
you
describe in patch #3. Would you mind checking?
I did check it! When I was working on patch #3, I disabled copy
construction, only allowed move constructor/assignment because I
specifically thought that the vector push_back was the reason for the
double frees, but it still happened.
That's weird, it would have perfectly explained it.
So with std::move we still have this problem?
Would you mind sharing some backtrace of this double free error ?

Huh... I guess I must have done something wrong when I tried this the last time

I just redid the changes to make the cleanup function into the destructors and now things just worked. I'll polish it a bit and send a v3 with that update! Thanks for getting me to try it again :)

-- 
Cheers,
Guinevere Larsen
It/she