From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3815 invoked by alias); 8 Jul 2014 17:03:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3775 invoked by uid 48); 8 Jul 2014 17:03:50 -0000 From: "jon.turney at dronecode dot org.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/61752] on cygwin, aborts during exit() with a dynamically loaded C++ library Date: Tue, 08 Jul 2014 17:03:00 -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: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jon.turney at dronecode dot org.uk X-Bugzilla-Status: UNCONFIRMED 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: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00489.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61752 --- Comment #1 from jon.turney at dronecode dot org.uk --- Created attachment 33092 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33092&action=edit Patch to cygming-crtbegin.c to prevent libgcc pinning itself in memory This seems to be caused by the fix for pr 57982, to fix a different abort during __gcc_deregister_frame() Since that change is baked into libgcc itself, that patch has the side-effect of making libgcc pin itself in memory. I can't really tell from what's written there if that was deliberate or not, but it seems that it introduces a different problem when the executable doesn't have a dependency on libgcc. Attached is a patch which modifies __gcc_register_frame() to avoid it pinning itself in memory. Alternatively, as [1] says, the assert in __deregister_frame_info_bases() itself could be removed. [1] http://www.mail-archive.com/gcc@gcc.gnu.org/msg68286.html