summaryrefslogtreecommitdiff
path: root/libbacktrace
diff options
context:
space:
mode:
authorchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-02 16:32:55 +0000
committerchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-02 16:32:55 +0000
commit047a1c2fd2a342dc223bc7210d19e4a59f651900 (patch)
tree0b3dedbbdec90aad69b442d95643d33d4d9f7ad2 /libbacktrace
parent901faaa0e25684369a068d794c8f6d58d37629a5 (diff)
libbacktrace/
2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com> * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to avoid possible crash. (elf_add): Don't set *fileline_fn to elf_nodebug value in case of missing debug info anymore. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233911 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/ChangeLog7
-rw-r--r--libbacktrace/elf.c3
2 files changed, 8 insertions, 2 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index b38e2fee45ca..eba342743850 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,10 @@
+2016-03-02 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
+ avoid possible crash.
+ (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
+ missing debug info anymore.
+
2016-02-06 John David Anglin <danglin@gcc.gnu.org>
* mmap.c (MAP_FAILED): Define if not defined.
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c
index 05cc5c04734b..f85ac65d99f1 100644
--- a/libbacktrace/elf.c
+++ b/libbacktrace/elf.c
@@ -791,7 +791,6 @@ elf_add (struct backtrace_state *state, int descriptor, uintptr_t base_address,
{
if (!backtrace_close (descriptor, error_callback, data))
goto fail;
- *fileline_fn = elf_nodebug;
return 1;
}
@@ -925,7 +924,7 @@ backtrace_initialize (struct backtrace_state *state, int descriptor,
int ret;
int found_sym;
int found_dwarf;
- fileline elf_fileline_fn;
+ fileline elf_fileline_fn = elf_nodebug;
struct phdr_data pd;
ret = elf_add (state, descriptor, 0, error_callback, data, &elf_fileline_fn,