public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Thomas Neumann <tneumann@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1514] release the sorted FDE array when deregistering a frame [PR109685] Date: Sat, 3 Jun 2023 07:47:42 +0000 (GMT) [thread overview] Message-ID: <20230603074742.B17243858D32@sourceware.org> (raw) https://gcc.gnu.org/g:5cf60b6ba111f4169305c7832b063b000e9ec36a commit r14-1514-g5cf60b6ba111f4169305c7832b063b000e9ec36a Author: Thomas Neumann <tneumann@users.sourceforge.net> Date: Tue May 2 16:21:09 2023 +0200 release the sorted FDE array when deregistering a frame [PR109685] The atomic fastpath bypasses the code that releases the sort array which was lazily allocated during unwinding. We now check after deregistering if there is an array to free. libgcc/ChangeLog: PR libgcc/109685 * unwind-dw2-fde.c: Free sort array in atomic fast path. Diff: --- libgcc/unwind-dw2-fde.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c index a5786bf729c..32b9e64a1c8 100644 --- a/libgcc/unwind-dw2-fde.c +++ b/libgcc/unwind-dw2-fde.c @@ -241,6 +241,12 @@ __deregister_frame_info_bases (const void *begin) // And remove ob = btree_remove (®istered_frames, range[0]); bool empty_table = (range[1] - range[0]) == 0; + + // Deallocate the sort array if any. + if (ob && ob->s.b.sorted) + { + free (ob->u.sort); + } #else init_object_mutex_once (); __gthread_mutex_lock (&object_mutex);
reply other threads:[~2023-06-03 7:47 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230603074742.B17243858D32@sourceware.org \ --to=tneumann@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).