1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-06-18 07:41:44 +02:00
Commit graph

13 commits

Author SHA1 Message Date
Arun Sharma 923fa78e79 Revert parts of 68a2910
The check breaks a few tests when used with gold.
2015-09-07 17:59:27 -07:00
Peter Wu 68a2910bae Check that the CIE is within the segment
Due to a bug in the gold linker[1], the .eh_frame and .eh_frame_hdr
sections contains garbage. When dwarf_extract_proc_info_from_fde tried
to look up the begin of the CIE subsection, it would underflow the
.eh_frame segment, resulting in a crash[2].

This patch avoids that crash by checking whether the CIE pointer is
located after the begin of the .eh_frame section. The variable "base"
was misused in various places as a boolean (decode as .debug_frame or
decode as .eh_frame). These instances have been renamed to
is_debug_frame where applicable.

Tested on Linux x86_64.

 [1]: https://sourceware.org/bugzilla/show_bug.cgi?id=17639
 [2]: http://lists.nongnu.org/archive/html/libunwind-devel/2014-11/msg00009.html

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2014-12-05 23:39:48 -08:00
Arun Sharma 781d5d5263 One time whitespace fixup.
for f in $(find src include -name '*.[ch]'); do
  expand -t 8 $f > $tmp; mv $tmp $f;
done
2014-09-27 09:47:23 -07:00
Lassi Tuura dac2d001af Identify signal frames by augmentation attribute. 2010-04-24 17:18:26 -07:00
Lassi Tuura 250382c56d Use wider format when printing addresses in debug format. 2010-04-24 17:18:19 -07:00
Daniel Jacobowitz 3842dac733 Add initial ARM and MIPS support. To support this, also enable the
reading of .debug_frame sections (used in lieu of .eh_frame sections
when they're not available).
2008-02-04 17:16:37 -07:00
Mark Wielaard 5ed2da2a40 [DWARF] Fix error return.
* src/dwarf/Gfde.c (dwarf_extract_proc_info_from_fde):
	  Return -UNW_ENOMEM.
2008-02-04 16:31:34 -07:00
hp.com!davidm 9fac7579ee Don't include <string.h> and "tdep.h".
(Logical change 1.294)
2005-05-20 09:48:08 +00:00
mostang.com!davidm 46b7b8196c (is_cie_id): New function.
(parse_cie): Adjust for moving DWARF2 extra-info from
	unw_dyn_dwarf_fde_info_t to dwarf_cie_info.
	Add support for `S' augmentation ("special frames").
(dwarf_extract_proc_info_from_fde): Rename frm dwarf_parse_fde().
	Convert to returning data via dwarf_cie_info rather than
	unw_dyn-dwarf_fde_info_t.  Allow 0-length FDE since those
	can be used to indicate the end of the FDE-table.  Return
	the end of the FDE via *ADDRP.  Ignore CIEs (we may pick them
	up during linear searches through the FDE-table).
	Fill in the unwind-info only if really needed.  When needed,
	return the info via a dynamically allocated dwarf_cie_info
	structure.  Add support for `S' augmentation (ABI/tag pairs).

(Logical change 1.290)
2005-05-03 09:13:17 +00:00
homeip.net!davidm 9ac7a860d1 (parse_cie): Clarify the comment about the default FDE-encoding a bit.
(Logical change 1.253)
2004-08-20 11:23:15 +00:00
homeip.net!davidm 077322d414 Drop DWARF-parsing debug prints from level 16 to 15.
(parse_cie): Pick correct default for FDE-encoding, not just DW_EH_PE_omit.

(Logical change 1.248)
2004-08-19 12:26:11 +00:00
homeip.net!davidm 32f3a1e58f Rename: src/dwarf/Gfde-dwarf.c -> src/dwarf/Gfde.c
(Logical change 1.241)
2004-08-17 15:34:28 +00:00
homeip.net!davidm 3f9d2e9c5c Initial revision 2004-08-17 15:34:28 +00:00