[Bug libelf/25077] New: AddressSanitizer: heap-buffer-overflow at libelf/elf32_updatefile.c:772

2019-10-07 Thread leftcopy.chx at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=25077 Bug ID: 25077 Summary: AddressSanitizer: heap-buffer-overflow at libelf/elf32_updatefile.c:772 Product: elfutils Version: unspecified Status: UNCONFIRMED Sev

[PATCH 4/5] libdwfl: cache Dwfl_Module and Dwarf_Frame for Dwfl_Frame

2019-10-07 Thread Omar Sandoval
From: Omar Sandoval The next change will need to have the Dwarf_Frame readily available, so rather than finding it again every time, let's cache it for reuse. The CFI frame can also be useful to clients of libdwfl, so add dwfl_frame_dwarf_frame to get it. Similarly, the Dwfl_Module is also freque

[PATCH 3/5] libdwfl: add interface for attaching to/detaching from threads

2019-10-07 Thread Omar Sandoval
From: Omar Sandoval libdwfl has implementations of attaching to/detaching from threads and unwinding stack traces. However, that functionality is only available through the dwfl_thread_getframes interface, which isn't very flexible. This adds two new functions, dwfl_attach_thread and dwfl_detach_

[PATCH 2/5] libdwfl: only use thread->unwound for initial frame

2019-10-07 Thread Omar Sandoval
From: Omar Sandoval thread->unwound is only used for set_initial_registers (via dwfl_thread_state_registers, dwfl_thread_state_register_pc, and a special case in core_set_initial_registers). At that point, thread->unwound is always the initial frame, so there's no need to update it as we unwind t

[PATCH 5/5] libdwfl: add interface for evaluating DWARF expressions in a frame

2019-10-07 Thread Omar Sandoval
From: Omar Sandoval libdwfl can evaluate DWARF expressions in order to unwind the stack, but this functionality isn't exposed to clients of the library. Now that the pieces are in place, add dwfl_frame_eval_expr to provide this feature. Signed-off-by: Omar Sandoval --- libdw/ChangeLog|

[PATCH 0/5] libdwfl: expand stack frame interface

2019-10-07 Thread Omar Sandoval
From: Omar Sandoval Hello, While using the libdwfl stack unwinding interface for my debugger [1], I found that it works great for getting the program counter at each stack frame, but it's hard to do anything beyond that. This is an attempt to expand the functionality by adding two main features:

[PATCH 1/5] libdwfl: don't bother freeing frames outside of dwfl_thread_getframes

2019-10-07 Thread Omar Sandoval
From: Omar Sandoval dwfl_thread_getframes always frees the state before returning, so dwfl_getthreads and getthread don't need to do it. Signed-off-by: Omar Sandoval --- libdwfl/ChangeLog| 6 ++ libdwfl/dwfl_frame.c | 18 +++--- 2 files changed, 9 insertions(+), 15 deletio