From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46D913857C64; Mon, 22 Jan 2024 09:57:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46D913857C64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705917422; bh=Saw57d6PXqB9Lmj6/9VBw0m1XXIA/Oa8gqjdOHKjduA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TFhGQgGuX6uH02J6jZMt8ivMCgDB/NA43xdZAq7afV6woS2iqJ/DwQghtSajf13Nt kUXYSrgmlBF0sM4ssV6hDvMHfodjHaBmx0VYpQcwe0k1Cvs+NKz2ybcMfO4W1sIu9v WCtffD8G6y7eT+4Yp2Bg2BJWFCBWkOJ+gQ6aidfk= From: "fw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap Date: Mon, 22 Jan 2024 09:57:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fw at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113401 --- Comment #4 from Florian Weimer --- (In reply to Iain Sandoe from comment #3) > for platforms using pthreads as the underlying resource, then perhaps we = can > do this without thread_atexit (which I do not see in many places) by using > pthread_cleanup_push () The current implementation already uses the same underlying mechanism as pthread_cleanup_push if building with -fexceptions. It does not solve the l= eak because the outermost handler deliberately does not perform a full dealloca= tion of the thread state.=