This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/67457] segfault in libbacktrace
- From: "ian at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 08 Sep 2015 16:46:47 +0000
- Subject: [Bug other/67457] segfault in libbacktrace
- Auto-submitted: auto-generated
- References: <bug-67457-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67457
--- Comment #4 from Ian Lance Taylor <ian at airs dot com> ---
I committed a patch that should produce a more graceful fallback when out of
memory. Please see if it helps your situation.
--- Comment #5 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Tue Sep 8 16:46:16 2015
New Revision: 227533
URL: https://gcc.gnu.org/viewcvs?rev=227533&root=gcc&view=rev
Log:
PR other/67457
* backtrace.c: #include "internal.h".
(struct backtrace_data): Add can_alloc field.
(unwind): If can_alloc is false, don't try to get file/line
information.
(backtrace_full): Set can_alloc field in bdata.
* alloc.c (backtrace_alloc): Don't call error_callback if it is
NULL.
* mmap.c (backtrace_alloc): Likewise.
* internal.h: Update comments for backtrace_alloc and
backtrace_free.
Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/alloc.c
trunk/libbacktrace/backtrace.c
trunk/libbacktrace/internal.h
trunk/libbacktrace/mmap.c