From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5074385841E; Mon, 22 Jan 2024 10:27:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5074385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705919277; bh=ewhueuUh3oJ9jYIHWvLXqygRYPbhi2RhzSrpKxJVk7k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hUgApe8FBZ8O2U79LuI3Rmxo+gqmjP1tqija3gzxWiA62fr3YMpxZbd2wFjTOgllL u2eZxYg4s6Us0wi1ySYGUgwdmG4QgTIgxIsw7PjxGQH9LPZvdj7/5GypaZXyMZwNKz uiRwZSaaeeyuzk1wW7e1Hn1CyVLEIJ+AEE5ENjEk= From: "iains 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 10:27:57 +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: iains 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 #7 from Iain Sandoe --- (In reply to Florian Weimer from comment #6) > Sorry, pthread_cleanup_push is purely scope-based, like the existing > handler. It cannot be used to push a handler to some unscoped cleanup > function list that persists even after the current function returns. It's > also implemented as a macro, so it's not possible to emit it from builtin > expansion. Ah, then we have a documentation issue, because man pthread_cleanup_push(3) describes running the registered functions on thread cancellation or on thread_exit() [but not, unfortunately if the thread exits by returning - so still not ideal].=