From: Guinevere Larsen <guinevere@redhat.com>
To: "Schimpe, Christina" <christina.schimpe@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 1/6] gdb/record: Refactor record history
Date: Thu, 14 May 2026 12:20:10 -0300 [thread overview]
Message-ID: <4c825e40-13af-4ce7-9169-de2737643ab8@redhat.com> (raw)
In-Reply-To: <SN7PR11MB763827776662E108B20CF99FF9062@SN7PR11MB7638.namprd11.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2730 bytes --]
next prev parent reply other threads:[~2026-05-14 15:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 15:25 [PATCH v2 0/6] refactor the internals of record-full Guinevere Larsen
2026-04-23 15:25 ` [PATCH v2 1/6] gdb/record: Refactor record history Guinevere Larsen
2026-04-28 3:28 ` Thiago Jung Bauermann
2026-04-28 19:54 ` Guinevere Larsen
2026-05-06 21:16 ` Schimpe, Christina
2026-05-07 17:38 ` Guinevere Larsen
2026-05-11 15:23 ` Schimpe, Christina
2026-05-12 18:50 ` Guinevere Larsen
2026-05-13 7:54 ` Schimpe, Christina
2026-05-14 15:20 ` Guinevere Larsen [this message]
2026-04-23 15:26 ` [PATCH v2 2/6] gdb/record: remove record_full_insn_num Guinevere Larsen
2026-04-23 15:26 ` [PATCH v2 3/6] gdb/record: c++ify internal structures of record-full.c Guinevere Larsen
2026-04-28 3:29 ` Thiago Jung Bauermann
2026-04-23 15:26 ` [PATCH v2 4/6] gdb/record: make record_full_history more c++-like Guinevere Larsen
2026-04-28 3:29 ` Thiago Jung Bauermann
2026-04-23 15:26 ` [PATCH v2 5/6] gdb/record: extract the PC to record_full_instruction Guinevere Larsen
2026-04-28 3:30 ` Thiago Jung Bauermann
2026-04-23 15:26 ` [PATCH v2 6/6] gdb/record: Define new version of the record-save section Guinevere Larsen
2026-04-23 15:45 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c825e40-13af-4ce7-9169-de2737643ab8@redhat.com \
--to=guinevere@redhat.com \
--cc=christina.schimpe@intel.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox