From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62693 invoked by alias); 8 Sep 2015 17:16:41 -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 62657 invoked by uid 48); 8 Sep 2015 17:16:37 -0000 From: "Joost.VandeVondele at mat dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/67457] segfault in libbacktrace Date: Tue, 08 Sep 2015 17:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Joost.VandeVondele at mat dot ethz.ch X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-09/txt/msg00649.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67457 --- Comment #6 from Joost VandeVondele --- (In reply to Ian Lance Taylor from comment #4) > I committed a patch that should produce a more graceful fallback when out of > memory. Please see if it helps your situation. Great! Not sure how you managed, but this gives a clean symbolic backtrace, at least for this simple test case: > ./a.out Operating system error: Cannot allocate memory Allocation would exceed memory limit Error termination. Backtrace: Could not print backtrace: mmap: Cannot allocate memory Could not print backtrace: mmap: Cannot allocate memory Could not print backtrace: mmap: Cannot allocate memory Could not print backtrace: mmap: Cannot allocate memory Could not print backtrace: mmap: Cannot allocate memory #0 0x7f068c128e09 in ??? #1 0x7f068c129905 in ??? #2 0x7f068c129b02 in ??? #3 0x40081d in __foomod_MOD_foo at /data/vjoost/gnu/bugs/test_1.f90:7 #4 0x4008bf in MAIN__ at /data/vjoost/gnu/bugs/test_1.f90:16 #5 0x4008f5 in main at /data/vjoost/gnu/bugs/test_1.f90:12